Вы находитесь на странице: 1из 10

1. Which of the following linked lists will give 0(1) complexity, if we need to concatenate?

1. Singly linked list


2. Double linked list
3. Circular linked list
Choose the correct answer from the options given below.

a) Only 2 and 3

b) Only 1 and 2

c) Only 3

d) All 1,2 and 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

b) If (rear + 1) % max size = front

c) If front! = 0 and rear = max -1

d) If front = 0 and 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

b) Full – binary tree

c) Complete binary 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

c) None of the mentioned options

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)

8. Which of the following data structure is used in case of recursion?

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

a) to print all integers from 1 to n omitting those integers which are


divisible by 7

b) to print all the integer from 1 to n those are divisible by 7 

c) None of the mentioned options.

d) to print the maximum number from 1 to n which is not divisible by 7

16. Queue data structure works on

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

1. All of the mentioned

2. The size of array has to be pre-defined, linked lists can change their size any time

3. Random access is not allowed in a typical implementation of linked lists

4. It is easy to insert and delete elements in linked list


What will be the value of t if a = 56, b= 876?
Read a, b
Function mul(a,b)
t=0
while (b !=0)
t = t+a
b= b-1
End while
return t;
End Function

o 490563

o 490561

o 49056

o None of the mentioned

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

21. Stack is also called as


a) First in first out

b) First in last out

c) Last in last out

d) last in first out

22. Any node is the path from the root to the node is called

a) ancestor node

b) Successor node

c) Internal node

d) None of the above

23. Which of the following is not the type of queue?

a) priority queue

b) Circular queue

c) Single ended 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

c) graph node, edged

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

d) binary tree search

26. In the.............traversal we process all of a vertex’s descendants before we move to an adjacent


vertex.
a) Depth limited

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

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

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

d) None of the above

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

d) None of the above


31. ...... is a pile in which items are added at one end and removed from other.

a) List
b) Queue

c) Stack

d) Array

32. Which of the following is non-linear data structure?

a) Trees

b) Stacks

c) Strings

d) All of the above

33. ..... is not the operation that can be performed on queue.

a) Traversal

b) Insertion

c) Deletion

d) Retrieval

34. Which is/are the application(s) of stack

a) Function calls

b) Large number Arithmetic

c) Evaluation of arithmetic expressions

d) All of the above

35. Which of the following data structures are indexed structures?

a) Stack

b) Linked lists

c) Linear arrays

d) None of the above

36. Which of the following data structure store the homogeneous data elements?

a) Lists

b) Pointers
c) Records

d) Arrays

37. Linear arrays are also called........

a) One-dimensional array

b) Vertical array

c) Horizontal array

d) All of the above

38. A........does not keep track of address of every element in the list.

a) Stack

b) Queue

c) String

d) Linear array

39. The complexity of linear search algorithm is

a) O(n)

b) O(log n)

c) O(n2)

d) O(n log n)

40. The complexity of Bubble sort algorithm is

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?

a) if front = 0 and rear = max +1

b) if rear != max -1

c) if (rear +1)% max size = front


d) if front !=0 and 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?

a) A strictly binary tree with n leaves with(2n-1) nodes

b) A strictly binary tree with n leaves with(2n-1) nodes

c) A strictly binary tree with n leaves with(2n) nodes

d) A strictly binary tree with n leaves with(2n +1) nodes

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

a) 15,10,25, 23, 20, 42, 35, 39, 30

b) 15, 20, 10, 23, 25, 42, 35, 39, 30

c) cannot be determined

d) 15,10, 23, 25, 20, 35, 42, 39,30

Вам также может понравиться