If this node is a leaf and matches with last entry of array .
if ( ( root . left == null && root . right == null ) && ( root . data == arr [ index ] && root . data == arr [ arr . Length - 1 ] ) ) { return true ; }