0% found this document useful (0 votes)
25 views3 pages

Viva 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views3 pages

Viva 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CSL-201-DATA STRUCTURES LAB

VIVA(1)
11/10/23 - BATCH (2)

1.What is a data structure?


a) A programming language
b) A collection of algorithms
c) A way to store and organize data
d) A type of computer hardware
2. Which data structure is needed to convert infix notation to postfix notation?
a) Tree
b) Branch
c) Stack
d) Queue
3. What is the value of the postfix expression 6 3 2 4 + – *?
a) 74
b) -18
c) 22
d) 40
4. The prefix form of A-B/ (C * D ^ E) is?
a) -A/B*C^DE
b) -A/BC*^DE
c) -ABCD*^DE
d) -/*^ACBDE
5. Which data structure is based on the Last In First Out (LIFO) principle?
a) Tree
b) Linked List
c) Stack
d) Queue
6. Process of inserting an element in stack is called ____________
a) Create
b) Push
c) Evaluation
d) Pop
7. In a stack, if a user tries to remove an element from an empty stack it is
called _________
a) Underflow
b) Empty collection
c) Overflow
d) Garbage Collection
8.Pushing an element into stack already having five elements and stack size of
5, then stack becomes ___________
a) Overflow
b) Crash
c) Underflow
d) User flow
9. Time complexity of bubble sort in best case is

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

a. Stack follows FIFO

a. Elements are stored in a sequential manner

a. Top of the stack contains the last inserted element

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

a. None of the above

You might also like