All challenges

Hash maps

Counting and looking things up in constant time with dictionaries and sets.

StatusChallengeLevelSave
1.Two SumFind the two positions whose numbers add up to a target.Easy
2.Contains DuplicateCheck whether any number appears twice.Easy
3.Valid AnagramCheck whether one word is a rearrangement of another.Easy
4.Single NumberEvery number appears twice except one; find it.Easy
5.Majority ElementFind the value that fills more than half of the array.Easy
6.Roman to IntegerTurn a Roman numeral into a number.Easy
7.First Unique CharacterFind the first letter that appears only once.Easy
8.Longest Substring Without RepeatsFind the longest stretch of text with no repeated character.Medium
9.Top K FrequentReturn the k values that appear most often.Medium
10.Subarray Sum Equals KCount the runs of consecutive numbers that add up to k.Medium
11.Minimum Window SubstringFind the shortest stretch of text that contains every letter of another string.Hard
12.Word LadderFind the shortest chain of one-letter changes from one word to another.Hard