โ† All topics

๐Ÿงฎ Interview Prep

Core Algorithms

Arrays, strings, hash maps, two pointers, sliding windows, stacks, binary search and linked lists: the coding rounds at almost every company.

100 questions, most asked first

Ranked by how often each question comes up in real interviews. #1 is the most common.

#1Two SumHash mapEasyFree#2Valid ParenthesesStackEasyFree#3Best Time to Buy and Sell StockGreedyEasyFreeUnlock 34 more Core Algorithms questions ยท all 1,200 questions for $39/year (about 11ยข a day)See full access#11Valid AnagramHash mapEasy๐Ÿ”’#13Contains DuplicateHash mapEasy๐Ÿ”’#14Reverse Linked ListLinked listEasy๐Ÿ”’#15Merge Two Sorted ListsLinked listEasy๐Ÿ”’#16Binary SearchBinary searchEasy๐Ÿ”’#18Valid PalindromeTwo pointersEasy๐Ÿ”’#21Move ZeroesTwo pointersEasy๐Ÿ”’#23Linked List CycleLinked listEasy๐Ÿ”’#27First Unique Character in a StringHash mapEasy๐Ÿ”’#37Meeting RoomsIntervalsEasy๐Ÿ”’#42Majority ElementHash mapEasy๐Ÿ”’#44Merge Sorted ArrayTwo pointersEasy๐Ÿ”’#45Remove Duplicates from Sorted ArrayTwo pointersEasy๐Ÿ”’#62Longest Common PrefixSortingEasy๐Ÿ”’#63Roman to IntegerHash mapEasy๐Ÿ”’#65Plus OneBits & mathEasy๐Ÿ”’#67Sqrt(x)Binary searchEasy๐Ÿ”’#68Single NumberBits & mathEasy๐Ÿ”’#69Number of 1 BitsBits & mathEasy๐Ÿ”’#70Counting BitsBits & mathEasy๐Ÿ”’#71Missing NumberBits & mathEasy๐Ÿ”’#72Reverse BitsBits & mathEasy๐Ÿ”’#75Happy NumberHash mapEasy๐Ÿ”’#76Palindrome NumberBits & mathEasy๐Ÿ”’#77Isomorphic StringsHash mapEasy๐Ÿ”’#78Ransom NoteHash mapEasy๐Ÿ”’#81Next Greater ElementMonotonic stackEasy๐Ÿ”’#86Implement Queue using StacksDesignEasy๐Ÿ”’#90Range Sum Query (Immutable)Prefix sumEasy๐Ÿ”’#91Middle of the Linked ListLinked listEasy๐Ÿ”’#92Palindrome Linked ListLinked listEasy๐Ÿ”’#93Intersection of Two Linked ListsLinked listEasy๐Ÿ”’#94Squares of a Sorted ArrayTwo pointersEasy๐Ÿ”’#95Find Pivot IndexPrefix sumEasy๐Ÿ”’