DSA Quiz
Check what you have learned in the DSA tutorial with these questions.
How the Quiz Works
- 10 questions cover every lesson
- Choose one answer for each question
- Read the explanation after each answer
- If you miss one, revisit that lesson and try the examples again
Quiz Questions
Exercise
Which Big O grows the slowest as n gets bigger?
Exercise
What is the time complexity of reading items[i] from a Python list?
Exercise
Which is faster in a linked list than in an array?
Exercise
Which data structure follows the Last In, First Out rule?
Exercise
Why should you use collections.deque instead of list.pop(0) for a queue?
Exercise
What is the average time to look up a key in a Python dictionary?
Exercise
What is wrong with this function? def f(n): return n * f(n - 1)
Exercise
What is the worst-case time of binary search on a sorted list?
Exercise
Which sorting algorithm is always O(n log n), even in the worst case?
Exercise
What does an in-order traversal of a binary search tree give?
What Next?
Congratulations on finishing the DSA tutorial. The best way to get better is practice: solve one or two problems a day on a coding challenge site, starting with easy array and string problems. Then move on to dynamic programming, heaps and more graph algorithms.
Before writing code for any problem, ask yourself: which data structure fits, and what is the Big O of my plan? This habit is what interviewers look for.
