Sometimes it is very hard or not so apparent as to how to arrive at a solution for a particular problem.
In this case, it is easier to transform the problem into something that we recognize, and then try to solve that problem to arrive at the solution.
Consider the problem of finding LCM of a number. Brute force approach of trying every number and seeing if it is the LCM is not the best approach. Instead, we can find the GCD of the problem using a very fast algorithm known as Euclid's algorithm and then use that result to find the LCM as LCM ( a , b ) = (a * b) / GCD ( a , b )
Read more at http://gonitsora.com/algorithm-types-and-classification/#8mose4xe7DBpLOcy.99