function to insert element in binary tree
static void insert ( Node temp , int key ) { if ( temp == null ) { root = new Node ( key ) ; return ; } Queue < Node > q = new LinkedList < Node > ( ) ; q . add ( temp ) ;