PHP and Javascript solutions to moderate challenge #11 - Lowest common ancestor