Before going for the recursive method.