15 to 30 random questions in 15 to 30 minutes, by the level you choose: big-o, arrays, linked lists, trees, graphs, dp, greedy and sorting. After you submit you get your score, your strong and weak topics, and the right answer with an explanation for every question.
Want to revise first? Read the Data Structures and Algorithms interview questions and answers.
The test covers 13 topics across three levels. Each attempt picks 15 to 30 questions at random, by the level you choose, so every attempt is different.
One question from each level, the way they appear in the test. A new set comes on the 1st of every month. Try it, then open the answer.
Answer: O(1). A Python list is a dynamic array of references stored side by side, so the position of item i is worked out directly from i. Nothing is scanned, so indexing takes the same time for 10 items or 10 lakh items.
Answer: 14. Capacity 14 works: the days carry 4 + 8 + 2; 7 + 5; 3 + 6. One kg less needs a 4th day. Binary search on capacity between the heaviest box (8) and the total (35) finds this, since more capacity never needs more days.
import heapq
a = [5, 9, 3, 7, 1]
b = []
for x in a:
heapq.heappush(b, x)
heapq.heapify(a)
print(a)
print(b) Answer: [1, 5, 3, 7, 9] then [1, 3, 5, 9, 7]. Both lists are valid min-heaps with 1 at the root, but they differ: pushing one by one sifts each new value up, while heapify sifts parents down from the bottom. A heap's layout depends on how it was built; only the parent-child rule is fixed.
Take the full Data Structures and Algorithms mock test: 15 to 30 questions and 15 to 30 minutes, by level.
A question counts as right only when you pick exactly the right option, or all the right options where it says so; a question left blank counts as wrong. Your score is the share of the test's questions you got right (15 to 30, by level). The result also scores every topic, so you know what to revise before the interview.
Yes. The Data Structures and Algorithms mock test is free. You need a free CoreHRx Jobs account to start it, so your score and the topics to work on are saved.
It depends on the level: Easy has 15 questions in 15 minutes, Medium has 20 questions in 20 minutes, Hard has 30 questions in 30 minutes. They are multiple-choice questions picked at random from a larger bank of Data Structures and Algorithms questions at your level, so every attempt is different.
The questions cover Graphs, Dynamic Programming, Sorting and Searching, Trees and BST, Recursion and Backtracking, Complexity Analysis, Stacks and Queues, Arrays and Strings, Hashing, Two Pointers and Sliding Window, Greedy Algorithms, Heaps, Linked Lists. Your result shows how you did in each topic.
Easy: Arrays, strings, hashing, stacks, queues and Big-O basics. Medium: Trees, heaps, recursion, sorting and the patterns most coding rounds use. Hard: Graphs, dynamic programming and greedy choices, for top scores. Start with Easy and move up.
Only your best Data Structures and Algorithms score, and only when it is 60% or more. It shows on the job applications you send on CoreHRx. Lower scores stay private.
Yes, up to 10 tests a day. Each attempt picks questions you have not seen recently first.