function to insert elements of the tree to map m
function storeInorder ( root , v ) { if ( root == null ) return ; storeInorder ( root . left , v ) ; v . push ( root . data ) ; storeInorder ( root . right , v ) ; }