Changing Equation Into Pre Order Binary Tree