[go: up one dir, main page]

0% found this document useful (0 votes)
289 views9 pages

Data Structure Multiple Choice Questions and Answer PDF

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 9

Data Structure Multiple Choice Questions and Answer PDF

1. Which one of the following is the process of inserting an element in the stack?

A. Insert

B. Push

C. Add

D. None of the above

Answer: Push

2. Which one of the following is not the application of the stack data structure?

A. Asynchronous data transfer

B. String reversal

C. Backtracking

D. Recursion

Answer: Asynchronous data transfer

3. Which of the following is the prefix form of A+B*C?

A. +A*BC

B. ABC+*

C. +AB*C

D. A+(BC*)

Answer: +A*BC

4. Which data structure is required to convert the infix to prefix notation?

A. Queue

B. stacks
C. Linked list

D. Binary tree

Answer: stacks

5. Which of the following highly uses the concept of an array?

A. Binary Search tree

B. Caching

C. Spatial locality

D. Scheduling of Processes

Answer: Spatial locality

6. Which of the following is the infix expression?

A. ABC+*

B. A+B*C

C. +A*BC

D. None of the above

Answer: A+B*C

7. Which data structure is mainly used for implementing the recursive algorithm?

A. Stack

B. Queue

C. Linked list

D. Binary tree

Answer: Stack

8. What is the outcome of the prefix expression +, -, *, 3, 2, /, 8, 4, 1?

A. 12
B. 5

C. 11

D. 4

Answer: 5

9. Which one of the following node is considered the top of the stack if the stack is
implemented using the linked list?

A. Second Node

B. First Node

C. Last Node

D. None of the above

Answer: First Node

10. A list of elements in which enqueue operation takes place from one end, and
dequeue operation takes place from one end is_________

A. Queue

B. Stack

C. Binary Tree

D. Linked List

Answer: Queue

11. The necessary condition to be checked before deletion from the Queue is_________

A. Underflow

B. Front value

C. Overflow

D. Rear value

Answer: Underflow
12. Which one of the following is not the application of the Queue data structure?

A. Data is transferred asynchronously

B. Resource shared between various systems

C. Balancing of symbols

D. Load balancing

Answer: Balancing of symbols

13. What is the maximum number of children that a node can have in a binary tree?

A. 4

B. 1

C. 3

D. 2

Answer: 2

14. Which one of the following techniques is not used in the Binary tree?

A. Preorder traversal

B. Randomized traversal

C. Inorder traversal

D. Postorder traversal

Answer: Randomized traversal

15. How many Queues are required to implement a Stack?

A. 3

B.2

C.1

D.4
Answer: 2

16. A linear data structure in which insertion and deletion operations can be performed
from both the ends is_______

A. Circular Queue

B. Deque

C. Queue

D. Priority Queue

Answer: Deque

17. How can we describe an array in the best possible way?

A. Arrays are immutable

B. Container that stores the elements of similar types

C. The Array is not a data structure

D. The Array shows a hierarchical structure

Answer: Container that stores the elements of similar types

18. What is another name for the circular queue among the following options?

A. Rectangle buffer

B. Square buffer

C. Ring Buffer

D. None of the above

Answer: Ring Buffer

19. Which of the following that determines the need for the Circular Queue?

A. Follow the LIFO Principles

B. Access the Queue using priority

C. Avoid wastage of memory


D. Follows the FIFO principle

Answer: Avoid wastage of memory

20. Which of the following principle does Queue use?

A. FIFO Principles

B. LIFIO Principles

C. Ordered Array

D. Linear Tree

Answer: FIFO Principles

21. Which data structure is the best for implementing a priority queue?

A. Stack

B. Linked list

C. Array

D. binary Heap

Answer: binary Heap

22. Which of the following data structures finds its use in recursion?

A. Stack

B. Linked list

C. Array

D. Queue

Answer: Stack

23. Which of the following satisfies the property of the Red Black tree?

A. Black, if the new node is a root node

B. Red, if the new node is not a root node


C. Black, if the new node is not a root node

D. Both A and B

Answer: Both A and B

24. In the Deque implementation using singly linked list, what would be the time
complexity of deleting an element from the rear end?

A. O(n2)

B. O(1)

C. O(nlogn)

D. O(n)

Answer: O(n)

25. Which one of the following is the overflow condition if linear queue is implemented
using an array with a size MAX_SIZE?

A. rear=MAX_SIZE -1

B. rear = MAX_SIZE

C. rear = front+1

D. rear = front

Answer: rear=MAX_SIZE -1

26. Which of the following is a Divide and Conquer algorithm?

A. Merge Sort

B. Heap Sort

C. Selection Sort

D. Bubble Short

Answer: Merge Sort

27. Which of the following principle is used if two elements in the priority queue have
the same priority?
A. Linear Tree

B. FIFO

C. LIFO

D. None of the above

Answer: FIFO

28. The time complexity of enqueue operation in Queue is ______

A. O(n)

B. O(1)

C. O(nlogn)

D. O(logn)

Answer: O(1)

29. Which one of the following is not the type of the Queue?

A. Linear Queue

B. Single ended Queue

C. Circular Queue

D. Double ended Queue

Answer: Single ended Queue

30. If the elements '1', '2', '3' and '4' are added in a stack, so what would be the order
for the removal?

A. 4321

B. 1234

C. 2314

D. None of the above

Answer: 4321

You might also like