Two Sum
Return indices (i, j) with i < j such that nums[i] + nums[j] == target.
Word frequency
Return a dict mapping each word to its count in the sentence.
Group anagrams
Group words that are anagrams of each other.
First non-repeating character
Find the index of the first character that appears only once.
Most frequent element
Return the element that appears most often in a list.
Subarray sum equals K
Count the number of contiguous subarrays whose sum equals k.
LRU cache decorator
Implement @lru_cache(maxsize=N) for unary functions using OrderedDict.
Showing 7 challenges