Nexus Learn

Data Structures and Algorithms MCQs with answers

Data structures decide how fast a program can store and find data. These questions test the basics: stacks, queues, trees, hashing and Big-O time complexity.

Answered 0 / 10 Correct 0
1 Which data structure follows the Last In, First Out (LIFO) rule?
2 Which data structure follows First In, First Out (FIFO)?
3 What is the worst-case time of binary search on a sorted array of n items?
4 What is the average time to look up a key in a good hash table?
5 An inorder traversal of a binary search tree visits the keys in which order?
6 Which data structure does breadth-first search (BFS) use?
7 Depth-first search (DFS) is naturally implemented with which structure?
8 How long does it take to insert a node at the head of a singly linked list?
9 What is the worst-case time complexity of quicksort?
10 What is the time complexity of merge sort in every case?

More practice

Keep learning with the free course notes and slides or try the GPA calculator.