๐ฎ Hash Maps (Practice)
Companion to the Hash Maps & Sets guide. Use a hash map to turn an O(nยฒ) scan into a single O(n) pass. Edit and run the code right here โ it executes in your browser.
๐ Your turnโ
Loading editorโฆ
๐ง Challenge yourselfโ
- Group a list of words into anagrams using a hash map.
- Find the first non-repeating character in a string.
- Why is average lookup O(1) but worst case O(n)?
Continue the learning path โ Linked Lists