Data Structures
Evaluate your understanding of fundamental data structures including arrays, linked lists, stacks, and queues.
10 Questions
intermediate
Quiz Questions
-
What is the time complexity of accessing an element in an array by index?
-
O(1)
-
O(n)
-
O(log n)
-
O(n^2)
-
Which data structure follows LIFO principle?
-
Queue
-
Stack
-
Array
-
Linked List
-
What is the time complexity of inserting at the beginning of a linked list?
-
O(1)
-
O(n)
-
O(log n)
-
O(n^2)
-
Which data structure follows FIFO principle?
-
What is a Binary Search Tree?
-
A tree with exactly two nodes
-
A tree where each node has at most 2 children and left < root < right
-
A tree used only for searching
-
A balanced tree structure
-
What is the worst-case time complexity of searching in a hash table?
-
O(1)
-
O(log n)
-
O(n)
-
O(n^2)
-
Which operation is NOT efficiently supported by arrays?
-
Random access
-
Insertion at end
-
Insertion in middle
-
Finding length
-
What is a doubly linked list?
-
A list with two heads
-
A list where each node points to next and previous nodes
-
A list that stores pairs of data
-
A list with double memory allocation
-
What is the height of a balanced binary tree with n nodes?
-
O(n)
-
O(log n)
-
O(n^2)
-
O(1)
-
Which data structure is best for implementing a priority queue?
-
Array
-
Linked List
-
Heap
-
Stack