map to store the matrix and hash to check if the element is present or not
Dictionary < int , Dictionary < int , int > > mp = new Dictionary < int , Dictionary < int , int > > ( ) ; Dictionary < int , Dictionary < int , int > > hash = new Dictionary < int , Dictionary < int , int > > ( ) ;