Hello, I am new to competitive programming and when I learn a new technique or algorithm I really don't know is it important to understand why this algorithm work or what is the math behind this algorithm ? or just I need to understand how it works and how to use it to solve the problems that this algorithm or technique fit in?