function to insert elements of the tree to map m
static void storeInorder ( Node root , List < int > v ) { if ( root == null ) return ; storeInorder ( root . left , v ) ; v . Add ( root . data ) ; storeInorder ( root . right , v ) ; }