Quiz

DSA quiz: 10 data structures and algorithms questions

A 10-question DSA quiz on arrays, stacks and queues, binary search, sorting, BSTs, BFS, heaps and Dijkstra, with each idea explained in plain English.

  • 8 min read
  • 10 questions
  • +60 XP
Transcript

Let's test your DSA knowledge by answering these 10 questions. Question 1 In most programming languages, what is the index of the first element in an array Question 2 True or False: does A stack follows Last In First Out order.

Question 3 Which data structure uses First In First Out order? Question 4 What is the time complexity of binary search on a sorted array? Question 5 Which traversal method is typically used to explore a graph level by level?

Question 6 Which of these sorting algorithms is considered stable? Question 7 True or False: In-order traversal of a Binary Search Tree returns elements in sorted order. Question 8 What is the worst-case time complexity of Quicksort? Question 9 Which data structure is most efficient for implementing a priority queue?

Question 10 What is the time complexity of Dijkstra's algorithm using a min-heap for a graph with V vertices and E edges? How many answers did you get right? Comment below.