Type Here to Get Search Results !

[ BEST ] Data Structure MCQ Questions and Answers [ SET - 2 ] | Data Structure Mcq Online Test with Answers

1. Which of the following data structure is linear type?

strings
stack
queue

2. The depth of a complete binary tree with ‘n’ nodes is (log is to the base two)A

log (n+1)- 1
log (n)
log (n-1) +1

3.  A linear list in which elements can be added or removed at either end but not in the middle is known as

queue
deque
stack

4. The number of binary relation on a set with n element is

n2
2n
2n2

5. A data structure in which linear sequence is maintained by pointers is known as

Array
Stack

6.  A dequeue operation removes an element

From the front of the queue
From any place in the queue
From the rear of the queue
ANSWER= (A) From the front of the queue

7. Stack is ____ type of data structure.

lifo
fifo
both a & b

8. The prefix expression for the infix expression a (b + c) / e-f is

/'a + bc-ef
-/+ abcef
-/'a + bcef

9. Worst space complexity of singly linked list is

o(n)
o(1)
o(log(n))

10. What is the minimum number of nodes in a complete binary tree with depth 3?

11. The number of stacks required to implement mutual recursion is

12.When is insertion sort a good choice for sorting an array?

The array has only a few elements out of place
Each element of array requires a small amount of memory
The processor speed is fast
ANSWER= (A) The array has only a few elements out of place

13. Pseudocode is a representation of the code required for ___.

A Program
An Algorithm
A single Instruction

14. Priority queue can be implemented using

array
heap

15. Which is better computing time (in the analysis of algorithm)?

O (N)
O (N)2
O (logN)

16. Name the tree in which, for every node, the height of left sub tree and height of right sub tree can differ by at most one

AVL tree
B-tree

17. Reserve Polish notation is often known as

Infix
Prefix
Postfix

18. Which of the following tree maintains a list of the keys in sequential order?

B+-tree
B*-tree
B-tree

19. Which of the following data structure is more appropriate to represent a heap?

Two-dimensional array
Linear Array

20. The evaluation of the postfix expression 3, 5, 7,*, +, 12, % is

2

21. If two trees have same structure and node content, then they are called ____

Synonyms trees
Joint trees
Equivalent trees

22. What is the worst case time for quick sort to sort an array of n elements?

0(n)
0(nlog2n)
0(log2n)

23. The operation for adding an entry to a stack is traditionally called

Append
Insert

24. Process of inserting an element in stack is called __

Push
Evaluation
Pop
ANSWER= (A) Process of inserting an element in stack is called Push

25. A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called ……

avl tree
red-black tree
lemma tree
ANSWER= (D) none of the above

26. The best data structure to evaluate an arithmetic expression in postfix form is

Queue
Stack
Tree

27. In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively.

0 and 1
0 and -1
-1 and 0

28. Which class in Java can be used to represent bit array?

BitArray
BitStream
BitSet

29.  What will be the value of top, if there is a size of stack STACK_SIZE is 5

30. The heap (represented by an array) constructed from the list of numbers 30, 10, 80, 60, 15, 55, 17 is -

60, 80, 55, 30, 10, 17, 15
80, 55, 60, 15, 10, 30, 17
80, 60, 30, 17, 55, 15, 10:
ANSWER= (B) 80, 55, 60, 15, 10, 30, 17

Friends if you like this post,kindly comment bellow and do share your responce.Thank You for Visiting.