Data structures & algorithms interview questions
Arrays, two pointers, hashing, stacks, linked lists, binary search, sorting, trees, heaps, graphs, backtracking and dynamic programming, all with tests that also catch slow solutions. 38 free questions in 7 topics, each with its answer and an explanation once you have tried it.
0 of 38 solved
Topics
- Complexity & choosing a structure · Quizzes (4), Flashcards (1), Put in order (1)
- Arrays & strings · Coding drills (11)
- Two pointers & hashing · Coding drills (3)
- Stacks, queues & linked lists · Coding drills (3)
- Searching & sorting · Coding drills (4)
- Trees, heaps & graphs · Coding drills (4), Flashcards (2)
- Backtracking & dynamic programming · Coding drills (5)
Complexity & choosing a structure
0 / 6Arrays & strings
0 / 11- Not attemptedAll subarraysDifficulty: easy
- Not attemptedRotate an array in placeDifficulty: medium
- Not attemptedLongest common prefixDifficulty: easy
- Not attemptedMerge intervalsDifficulty: medium
- Not attemptedMinimum difference of k scoresDifficulty: easy
- Not attemptedPivot indexDifficulty: easy
- Not attemptedFisher–Yates shuffleDifficulty: easy
- Not attemptedSpiral matrixDifficulty: medium
- Not attemptedSubarray with a given sum (negatives allowed)Difficulty: medium
- Not attemptedTitle case, GCD of strings, palindrome permutationDifficulty: easy
- Not attemptedMaximize distance to the closest personDifficulty: medium
Two pointers & hashing
0 / 3Stacks, queues & linked lists
0 / 3Searching & sorting
0 / 4Trees, heaps & graphs
0 / 6- Not attemptedTree traversals
- Not attemptedWhat makes a heap
- Not attemptedBinary search treeDifficulty: medium
- Not attemptedPriority queue (binary heap)Difficulty: medium
- Not attemptedGraph: adjacency list, DFS, BFS, shortest pathDifficulty: medium
- Not attemptedGrid DFS: word search & islandsDifficulty: medium
Backtracking & dynamic programming
0 / 5- Not attemptedSubsets & permutationsDifficulty: medium
- Not attemptedFibonacci & grid travelerDifficulty: easy
- Not attemptedcanSum, howSum, bestSumDifficulty: medium
- Not attemptedcanConstruct, countConstruct, allConstructDifficulty: medium
- Not attemptedHouse robber, stock, coin change, LISDifficulty: hard
Data structures & algorithms interview questions: FAQ
- How many Data structures interview questions are there?
- 38 questions in 7 topics: Quizzes (4), Coding drills (30), Flashcards (3), Put in order (1). All of them are free and need no login.
- What do the Data structures questions cover?
- Complexity & choosing a structure, Arrays & strings, Two pointers & hashing, Stacks, queues & linked lists, Searching & sorting, Trees, heaps & graphs and Backtracking & dynamic programming.
- How should I practise Data structures for a frontend interview?
- Go topic by topic and answer each question before you open its answer and explanation. Progress stays in your browser, so Review brings back the questions you missed, and a mock round mixes questions under a timer.