Push the element to container and hash the L and R
for ( int i = 0 ; i < n ; i ++ ) { v . add ( a [ i ] [ 0 ] ) ; mpp . put ( a [ i ] [ 0 ] , 1 ) ; v . add ( a [ i ] [ 1 ] ) ; mpp . put ( a [ i ] [ 1 ] , 2 ) ; }