Big List of DS&A Problems
Welcome to the Big List of DS&A Problems. This curated list of data structure & algorithm challenges is designed to help you study for online technical assessments in a structured way. (You can also pull from this list for the pair sessions.)
The key to success? Practice, practice, practice!
About the List
We’ve curated Leetcode problems based on key topics so you don’t have to hunt for them. Each topic has a “top challenge”, which is a commonly seen problem on technical assessments, and then “additional challenges”.
If you find the top challenge tricky and need additional practice, work through the additional coding challenges for that topic. Many of the problems use the same strategies with slight variations, so look for patterns!
Treat this list like a buffet. You do not need to be able to solve every problem on this list in order to pass the upcoming technical assessment. It’s just a guide, meant to be used as an overview of the types of questions that you might run into. Cool? Cool.
Here are some study tips to help you get the most out of algorithm practice:
- Set a timer (we recommend 30 minutes per problem).
- Practice in the same room where you would take a real assessment.
- If you struggle with a challenge, look up (aka google) a solution to see how it was answered. Then, try that problem again the next day.
Big List of DS&A Questions
The questions below will help you prepare for online assessments. We recommend attempting to solve the Top Challenge and then looking up a solution walkthrough on YouTube.
Even if you're able to get the test cases passing, looking up a solution will help you see other ways to approach the problem.
String Manipulation
Top Challenge
Additional Challenges
- https://leetcode.com/problems/detect-capital
- https://leetcode.com/problems/reverse-words-in-a-string-iii
- https://leetcode.com/problems/valid-palindrome
- https://leetcode.com/problems/reverse-vowels-of-a-string
- https://leetcode.com/problems/longest-common-prefix
Arrays
Top Challenge
Additional Challenges
- https://leetcode.com/problems/number-of-islands/
- https://leetcode.com/problems/sort-array-by-parity
- https://leetcode.com/problems/transpose-matrix
- https://leetcode.com/problems/flipping-an-image
Sorting
Top Challenge
Additional Challenges
- https://leetcode.com/problems/valid-anagram
- https://leetcode.com/problems/array-partition
- https://leetcode.com/problems/find-all-anagrams-in-a-string
Divide & Conquer
Top Challenge
Additional Challenge
Stacks
Top Challenge
Coding Challenges
- https://leetcode.com/problems/baseball-game
- https://leetcode.com/problems/next-greater-element-i
- https://leetcode.com/problems/backspace-string-compare
- https://leetcode.com/problems/score-of-parentheses
Linked Lists
Top Challenge
Additional Challenges
- https://leetcode.com/problems/reverse-linked-list
- https://leetcode.com/problems/reverse-linked-list-ii
- https://leetcode.com/problems/odd-even-linked-list
- https://leetcode.com/problems/intersection-of-two-linked-lists
- https://leetcode.com/problems/reverse-nodes-in-k-group
- https://leetcode.com/problems/lru-cache
Trees
Top Challenge
Coding Challenges
- https://leetcode.com/problems/n-ary-tree-postorder-traversal
- https://leetcode.com/problems/leaf-similar-trees
- https://leetcode.com/problems/same-tree
- https://leetcode.com/problems/sum-of-left-leaves
- https://leetcode.com/problems/diameter-of-binary-tree
- https://leetcode.com/problems/longest-univalue-path
- https://leetcode.com/problems/find-bottom-left-tree-value
Hashmaps & Sets
Top Challenge
Additional Challenges
- https://leetcode.com/problems/longest-substring-without-repeating-characters/
- https://leetcode.com/problems/valid-anagram/
- https://leetcode.com/problems/jewels-and-stones
- https://leetcode.com/problems/unique-morse-code-words
- https://leetcode.com/problems/happy-number
- https://leetcode.com/problems/uncommon-words-from-two-sentences
- https://leetcode.com/problems/distribute-candies
- https://leetcode.com/problems/groups-of-special-equivalent-strings
- https://leetcode.com/problems/intersection-of-two-arrays
- https://leetcode.com/problems/valid-sudoku
- https://leetcode.com/problems/isomorphic-strings
- https://leetcode.com/problems/word-pattern
- https://leetcode.com/problems/design-hashmap
- https://leetcode.com/problems/design-hashset
Multiset
- (Make sure to use a multiset for these problems as opposed to sorting)
- https://leetcode.com/problems/find-all-anagrams-in-a-string
- https://leetcode.com/problems/first-unique-character-in-a-string
- https://leetcode.com/problems/subdomain-visit-count
- https://leetcode.com/problems/find-the-difference
- https://leetcode.com/problems/sort-characters-by-frequency
- https://leetcode.com/problems/most-common-word
- https://leetcode.com/problems/sort-characters-by-frequency
- https://leetcode.com/problems/set-mismatch
- https://leetcode.com/problems/number-of-atoms
Recursion & Memoization
Top Challenge
Additional Challenges
- https://leetcode.com/problems/best-time-to-buy-and-sell-stock
- https://leetcode.com/problems/edit-distance
- https://leetcode.com/problems/house-robber-ii
- https://leetcode.com/problems/regular-expression-matching/ (Do not use a built-in regex for this one)
Dynamic Programming
Top Challenge
Additional Challenges
- https://leetcode.com/problems/best-time-to-buy-and-sell-stock
- https://leetcode.com/problems/edit-distance
- https://leetcode.com/problems/house-robber-ii
- https://leetcode.com/problems/regular-expression-matching/ (Do not use a built-in regex for this one)
Queues
Top Challenge
Additional Challenges
- https://leetcode.com/problems/implement-stack-using-queues/
- https://leetcode.com/problems/implement-queue-using-stacks/
- https://leetcode.com/problems/rotate-array
Graphs
Top Challenge
Additional Challenges
- BFS/DFS https://leetcode.com/problems/island-perimeter
- BFS https://leetcode.com/problems/is-graph-bipartite
- BFS https://leetcode.com/problems/word-search
- Top Sort https://leetcode.com/problems/course-schedule-ii
- Top Sort https://www.geeksforgeeks.org/given-sorted-dictionary-find-precedence-characters/
- https://leetcode.com/problems/longest-increasing-path-in-a-matrix