Function to check given sequence of root to leaf path exist in tree or not . index : current element in sequence of root to leaf path
static boolean existPath ( Node root , int arr [ ] , int n , int index ) { if ( root == null ) return ( n == 0 ) ; return existPathUtil ( root , arr , n , 0 ) ; }