Node class to create new node
public class Node { public int data ; public Node left ; public Node right ; public Node ( int data ) { this . data = data ; } } class GFG { static int count = 0 ; static Node ptr ;