A binary tree node has data , pointer to left child and a pointer to right child
class Node { public int data ; public Node left , right ; public Node ( int item ) { data = item ; left = right = null ; } } class Result { public int res = 0 ; } class GFG { Node root ;