Hash maps
Counting and looking things up in constant time with dictionaries and sets.
| Status | Challenge | Topics | Level | Accepted | Save |
|---|---|---|---|---|---|
| 1.Two SumFind the two positions whose numbers add up to a target. | ArraysHash maps | Easy | 100% | ||
| 2.Contains DuplicateCheck whether any number appears twice. | ArraysHash maps | Easy | – | ||
| 3.Valid AnagramCheck whether one word is a rearrangement of another. | StringsHash mapsSorting | Easy | – | ||
| 4.Single NumberEvery number appears twice except one; find it. | ArraysBit manipulationHash maps | Easy | – | ||
| 5.Majority ElementFind the value that fills more than half of the array. | ArraysHash maps | Easy | – | ||
| 6.Roman to IntegerTurn a Roman numeral into a number. | StringsMathHash maps | Easy | – | ||
| 7.First Unique CharacterFind the first letter that appears only once. | StringsHash maps | Easy | – | ||
| 8.Longest Substring Without RepeatsFind the longest stretch of text with no repeated character. | StringsSliding windowHash maps | Medium | – | ||
| 9.Top K FrequentReturn the k values that appear most often. | ArraysHash mapsSorting | Medium | – | ||
| 10.Subarray Sum Equals KCount the runs of consecutive numbers that add up to k. | ArraysHash maps | Medium | – | ||
| 11.Minimum Window SubstringFind the shortest stretch of text that contains every letter of another string. | StringsSliding windowHash maps | Hard | – | ||
| 12.Word LadderFind the shortest chain of one-letter changes from one word to another. | GraphsStringsHash maps | Hard | – |