Category : associative

I have an associative NxN matrix and a vector containing all columns: std::map<std::string,std::map<std::string,int>> A; std::vector<std::string> columns; //this has size n An element would look like this: A["abc"]["bcd"] = 2 I want to remove the row "abc" (so basically A["abc"]) and the column "abc" (so basically A[*]["abc"]) in O(n) A.erase("abc"); //this is O(log n) for (int ..

Read more