Split in two classes the iterative and recursive implementations for finding the order of magnitude