GATE 2025 Data Structures MCQs

1. What data structure follows the Last In, First Out (LIFO) principle?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: a) Stack


2. Which data structure follows the First In, First Out (FIFO) principle?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: b) Queue


3. In a singly linked list, what is the reference of the last node?

a) NULL
b) First node
c) Middle node
d) Random node

Answer: a) NULL


4. Which data structure represents a hierarchical relationship between elements?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: d) Tree


5. What operation is performed on a stack to retrieve an element?

a) Push
b) Pop
c) Enqueue
d) Dequeue

Answer: b) Pop


6. What data structure is typically used to implement recursion?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: a) Stack


7. Which data structure uses pointers for sequential access?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: c) Linked List


8. In a binary tree, what is the maximum number of children a node can have?

a) 0
b) 1
c) 2
d) 3

Answer: c) 2


9. What operation is used to add an element to the top of a stack?

a) Push
b) Pop
c) Enqueue
d) Dequeue

Answer: a) Push


10. Which data structure is known for its constant time complexity for insertion, deletion, and search operations in average cases?

a) Stack
b) Queue
c) Linked List
d) Hash Table

Answer: d) Hash Table


11. What is the time complexity of accessing an element in a hash table?

a) O(1)
b) O(log n)
c) O(n)
d) O(n log n)

Answer: a) O(1)


12. Which data structure allows elements to be inserted from one end and removed from the other?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: b) Queue


13. What operation is used to remove an element from the front of a queue?

a) Push
b) Pop
c) Enqueue
d) Dequeue

Answer: d) Dequeue


14. Which data structure is used in breadth-first search (BFS) algorithm?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: b) Queue


15. In a linked list, what is the time complexity to insert an element at the beginning?

a) O(1)
b) O(log n)
c) O(n)
d) O(n log n)

Answer: a) O(1)


16. Which of the following is NOT a type of tree?

a) Binary Tree
b) AVL Tree
c) Trie
d) Circular List

Answer: d) Circular List


17. Which data structure is commonly used in depth-first search (DFS) algorithm?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: a) Stack


18. What data structure is used to implement a priority queue?

a) Stack
b) Queue
c) Linked List
d) Heap

Answer: d) Heap


19. In a binary search tree, what is the property of the left child with respect to its parent?

a) Greater than parent
b) Less than parent
c) Equal to parent
d) No relation with parent

Answer: b) Less than parent


20. Which of the following is NOT a valid collision resolution technique used in hash tables?

a) Chaining
b) Open Addressing
c) Quadratic Probing
d) Pre-order Traversal

Answer: d) Pre-order Traversal


21. What is the worst-case time complexity of searching for an element in a binary search tree?

a) O(1)
b) O(log n)
c) O(n)
d) O(n log n)

Answer: b) O(log n)


22. Which of the following is a valid tree traversal method?

a) Stack Traversal
b) Queue Traversal
c) Depth-first Traversal
d) Breadth-first Traversal

Answer: c) Depth-first Traversal


23. What data structure is typically used to implement a stack?

a) Linked List
b) Queue
c) Array
d) Tree

Answer: c) Array


24. Which of the following is a characteristic of a complete binary tree?

a) Every node has exactly two children
b) Every level is completely filled except possibly the last level
c) Every node has at most one child
d) The height of the tree is logarithmic

Answer: b) Every level is completely filled except possibly the last level


25. What operation is used to retrieve the top element of a stack without removing it?

a) Peek
b) Pop
c) Enqueue
d) Dequeue

Answer: a) Peek

26. Which data structure is used in the implementation of a hash table to handle collisions?

a) Stack
b) Queue
c) Linked List
d) Binary Tree

Answer: c) Linked List


27. In a linked list, what is the time complexity of deleting an element from the end?

a) O(1)
b) O(log n)
c) O(n)
d) O(n log n)

Answer: c) O(n)


28. What is the maximum number of children a node can have in an n-ary tree?

a) n
b) n - 1
c) 2n
d) Unlimited

Answer: a) n


29. What operation is used to add an element to the end of a queue?

a) Push
b) Pop
c) Enqueue
d) Dequeue

Answer: c) Enqueue


30. Which data structure is used to implement the undo functionality in text editors?

a) Stack
b) Queue
c) Linked List
d) Tree

Answer: a) Stack