Viva 1
Viva 1
VIVA(1)
11/10/23 - BATCH (2)
a) θ (n)
b) θ (nlogn)
c) θ (n2)
d) θ (n(logn) 2)
10What is the average case complexity of bubble sort?
a) O(nlogn)
b) O(logn)
c) O(n)
d) O(n2)
11. The given array is arr = {1, 2, 4, 3}. Bubble sort is used to sort the array
elements. How many iterations will be done to sort the array?
a) 4
b) 2
c) 1
d) 0
12. Which matrix has most of the elements (not all) as Zero?
a) Identity Matrix
b) Unit Matrix
c) Sparse Matrix
d) Zero Matrix
12.Which data structure allows deleting from the front and inserting at rear?
a) Queue
b) stack
c) Array
d) None
13. Which data structure is required to convert the infix to prefix notation?
a. Stack
a. Linked list
a. Binary tree
a. Queue
14. Which of the following is not the correct statement for a stack data
structure?
a. Arrays can be used to implement the stack
15. If the elements '1', '2', '3' and '4' are inserted in a queue, what would be order
for the removal?
a. 1234
a. 4321
a. 3241