Find Duplicate Number
Find the duplicate number in an array containing n+1 integers where each integer is between 1 and n (inclusive)
Find Majority Element (Boyer-Moore Algorithm)
Find the majority element that appears more than n/2 times using Boyer-Moore majority vote algorithm
First Unique Character in String
Find the first non-repeating character in a string and return its index.
Group Anagrams
Given an array of strings, group the anagrams together.
Group Anagrams
Group strings that are anagrams of each other together.
Longest Substring Without Repeating Characters
Find the length of the longest substring without repeating characters
LRU Cache
Design a data structure that follows Least Recently Used (LRU) eviction with O(1) get and put operations.
Three Sum (Triplets that Sum to Zero)
Find all unique triplets in the array which gives the sum of zero
Top K Frequent Elements
Given an integer array and k, return the k most frequent elements.
Two Sum
Find two numbers in an array that add up to a target value.
Two Sum
Given an array of integers and a target, return indices of two numbers that add up to the target.
Valid Anagram
Given two strings, determine if one is an anagram of the other.
Valid Anagram
Determine if two strings are anagrams of each other