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 (n1) +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
Linked list
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
7. Stack is ____ type of data structure.

lifo
fifo
both a & b
8. The prefix expression for the infix expression a (b + c) / ef is

/'a + bcef
/+ 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
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
linked list
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
Btree
Threaded 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
Btree
19. Which of the following data structure is more appropriate to represent a heap?

Twodimensional array
Doubly linked list
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

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

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

avl tree
redblack tree
lemma tree
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:
Post a Comment
0 Comments