Microsoft Interview Question

Neighbour in a tree, pythogorian triplets in an array