FactSet Interview Question

code atoi function and finding lowest common ancestor of tow nodes in a tree