Java program to conver two dimensional array(child-parent nodes) into binary tree