You are viewing a single comment's thread. Return to all comments →
Isn't this O(n^2) time complexity? The foreach loop is O(n) and Remove is also O(n) and since it's nested you get O(n^2).
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
Isn't this O(n^2) time complexity? The foreach loop is O(n) and Remove is also O(n) and since it's nested you get O(n^2).