Академический Документы
Профессиональный Документы
Культура Документы
a) Only 2 and 3
b) Only 1 and 2
c) Only 3
2. When all the data that is to be sorted can be fitted at time in the main memory, it is called:
a) External sort
b) Radix sort
c) Stable sort
d) Internal sort
3. During insertion in a circular queue which of the following indicates that the queue is full?
a) If rear! = max-1
4. A binary tree in which all its levels except possibly the last, have the maximum number of nodes
and all the nodes at the last level appear as far left as possible, is known as:
a) AVL tree
d) Threaded tree
5. The process of accessing data stored in the tape is similar to manipulating data on a:
a) Queue
b) List
c) Set
d) Stack
6. Which of the following is the most appropriate data structure to print elements of a queue in reverse
order?
a) Linked –list
b) Stack
d) Tree
7. Consider the given schema for sorting binary trees in an array X. The indexing of the array starts
from 1 instead of 0. The root is stored at X[i]. For a node stored at X[j], the left child, if any, is stored
in X[2j] and the right child, if any, in X[2j +1].Determine the minimum size of X, to store any binary
tree of n vertices.
a) n(2n -1)
b) n
c) (2n + 1)
d) (2^n-1)
a) Array
b) Heap
c) Stack
d) Queue
9. For implementing which of the following algorithms, a linked list is not suitable?
a) Radix sort
b) Binary search
c) Polynomial manipulation
d) insertion sort
10. Which of the following algorithms is easily adaptable to singly linked list?
a) All of the mentioned options
b) Quick sort
c) Merge sort
d) Insertion sort
11. Which of the following is the correct number of undirected non-isomorphic graphs with n-
vertices?
a) (n -1)/2
b) n-2
c) n^2
d) 2^(n/2)
12. Find the possible permutations which can be obtained in the output (in the same order) with the
help of stack data structure assuming that the input is in the sequence 1, 2, 3, 4, 5 in that order
a) 5,4,3,2,1
b) 3,4,5,1,2
c) 3,4,5,2,1
d) 1,5,2,3,4
14. Which of the following algorithms can be used to calculate the shortest path between two nodes in
a graph?
1.Prim’s algorithm
2. kruskal’s algorithm
choose the correct answer from the options given below
a) Neither 1 nor 2
b) only 2
c) only 1
d) only 1 and 2
15. For which of the following purpose, the given pseudo code can be used?
1. Start
2. Read n
3. for k= 1 to n
4. r= k mod 7
5. if r not equal to 0
6. print k
7. stop
1. FILO
2. None of these
3. LIFO
4. FIFO
17. The five items A,B,C,D and E are pushed in a stack one after other starting from A. The stack is
popped four items and each element is inserted in a queue. The two elements are deleted from the
queue and pushed back on the stack. Now one item is popped from the stack . The popped item is:
1. B
2. C
3. A
4. D
18. Which of the following points is/are true about Linked List data structure when it is
compared with array
2. The size of array has to be pre-defined, linked lists can change their size any time
o 490563
o 490561
o 49056
19. If the sequence of operations – push(1) ,push(2), pop, push(1), push(2), pop, pop, pop, push(2)
pop are performed on a stack, the sequence of popped out values
1. 2,1,2,2,1
2. 2,2,1,1,2
3. 2,1,2,2,2
4. 2,2,1,2,2
20. The seven elements A, B, C, D, E, F and G are pushed on to a stack in reverse order, i.e., starting
from G. The stack is popped five times and each element is inserted into a queue . Two elements are
deleted from the queue and pushed back onto the stack . Now , one element is popped from the stack.
the popped item is_________
1. F
2. G
3. A
4. B
22. Any node is the path from the root to the node is called
a) ancestor node
b) Successor node
c) Internal node
a) priority queue
b) Circular queue
d) Ordinary queue
24. A graph is collection of nodes, called .......... And line segments called arcs or ....... that connect
pair of nodes.
a) vertices, paths
b) vertices, edges
d) edges, vertices
25. In............ search start at the beginning of the list and check every element in the list.
a) binary search
b) hash search
c) linear search
b) With first
c) breadth first
d) Depth first
27. To represent hierarchical relationship between elements. Which data structure is suitable?
a) Graph
b) Trees
c) Dequeue
d) Priority
a) stack
b) Graph
c) Trees
d) Binary tree
29. Which of the following data structure can’t store the nonhomogeneous data elements?
a) Arrays
b) Stacks
c) Records
30. A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is
called......
a) Lemma tree
b) Redblack tree
c) AVL tree
a) List
b) Queue
c) Stack
d) Array
a) Trees
b) Stacks
c) Strings
a) Traversal
b) Insertion
c) Deletion
d) Retrieval
a) Function calls
a) Stack
b) Linked lists
c) Linear arrays
36. Which of the following data structure store the homogeneous data elements?
a) Lists
b) Pointers
c) Records
d) Arrays
a) One-dimensional array
b) Vertical array
c) Horizontal array
38. A........does not keep track of address of every element in the list.
a) Stack
b) Queue
c) String
d) Linear array
a) O(n)
b) O(log n)
c) O(n2)
d) O(n log n)
a) O(n)
b) O(log n)
c) O(n2)
d) 0(n log n)
41. During insertion in a circular queue which of the following indicates that the queue is full?
b) if rear != max -1
42. Which of the following is the correct number of minimal AVL tree of height 6?
a) 6
b) 20
c) 15
d) None
43. Which of the following statements is true regarding strictly binary tree?
44. Given below is the pre order traversal sequence of a binary search tree, what would be the post
order traversal sequence of the same tree?
30, 20, 10, 15, 23, 39, 35, 42
c) cannot be determined