A utility function to print tree
static void preorder ( Node root ) { if ( root != null ) { System . out . print ( " key : ▁ " + root . key ) ; if ( root . left != null ) System . out . print ( " ▁ left ▁ child : ▁ " + root . left . key ) ; if ( root . right != null ) System . out . print ( " ▁ right ▁ child : ▁ " + root . right . key ) ; System . out . println ( ) ; preorder ( root . left ) ; preorder ( root . right ) ; } }