Data Structures Quiz
Test your knowledge of data structures with this comprehensive quiz. Please answer all questions.
Full Name
*
First Name
Last Name
Email Address
*
example@example.com
Which of the following is a linear data structure?
*
Array
Tree
Graph
Hash Table
Select all operations that can be performed on a stack.
*
Push
Pop
Enqueue
Peek
What is the time complexity of searching for an element in a balanced binary search tree (BST)?
*
O(1)
O(log n)
O(n)
O(n log n)
Match each data structure to its typical use case.
*
Rows
Use Case
Stack
Implementing function calls (call stack)
Fast lookup by key
Breadth-first search
Storing sorted data
Hash Table
Implementing function calls (call stack)
Fast lookup by key
Breadth-first search
Storing sorted data
Queue
Implementing function calls (call stack)
Fast lookup by key
Breadth-first search
Storing sorted data
Binary Search Tree
Implementing function calls (call stack)
Fast lookup by key
Breadth-first search
Storing sorted data
Which traversal method visits the left subtree, then the root, then the right subtree?
*
Preorder
Inorder
Postorder
Level order
Explain the difference between a queue and a stack.
*
What is the best data structure to use for implementing an undo feature in a text editor?
*
Queue
Stack
Array
Linked List
Rate your confidence in your knowledge of data structures.
1
2
3
4
5
Which of the following statements about graphs is false?
*
A graph can have cycles.
In a directed graph, edges have direction.
A tree is a type of graph.
All graphs are trees.
Submit Quiz
Should be Empty: