I am trying to convert the entire elements of a matrix in to a hashmap. for that what i tried is using map<pair<int,int>,int>mp;
where pair<int,int> are the array indices and the value is the value in the element of a matrix.
so i tried this way
mp[{i,j}]=value;
It works fine but what i am interested in is finding the time complexity .In general if there and n keys maping to a value what will be the time complexity and how.