WorksheetsBatch 1 Quiz - DSA Lab
Total questions: 25
Worksheet time: 25mins
Process of adding an element to a stack is
Create
Push
Evaluation
Pop
Process of removing an element from the stack
Create
Push
Evaluation
Pop
Stack Data Structure is
FIFO
None of these
LILO
LIFO
LEMON ----- Top
ROSE
CARROT
CORN
TULIP
After three POP operations have been performed on the above stack, the three items, in order, which will be taken out of the stack are
LEMON, ROSE, CARROT
ROSE, CARROT, CORN
TULIP, CORN, CARROT
CARROT, CORN, TULIP
A stack is a data structure in which elements
can be added to any position and removed only from the top
can be only added to the top and removed from any position
can be added and removed from the top only
can be added and removed from any position
Which of the following statements is a specification of a set of data and the set of operations that can be performed on the data?
Library
ADT
Package
Tracer
Only top element can be accessed in stack
TRUE
FALSE
Stacks have LIFO ordering
TRUE
FALSE
LIFO stands for
List of Outputs
Last in First Out
First in Last Out
None of them
Select a real life situation implement stack
All of the answers
The cars a garage the first car in will be the last car out of the garage
The batteries in a flashlight
The person wear bangles
The number of swaps made by selection sort algorithm in each iteration is _________
1
N
N-1
depends on the input
The quick sort algorithm splits the list into equal halves in each and every partitioning. State true or false.
True
False
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
DCBA
ABDA
ABDC
Let size of queue is 4. The following operations are performed in order.
enqueue(10)
enqueue(20)
enqueue(30)
enqueue(40)
what will be the result after executing enqueue(50)?
Queue Empty
Queue Full
None
5
A normal queue, if implemented using an array of size MAX_SIZE, gets full when
Rear = MAX_SIZE – 1
Front = (rear + 1)mod MAX_SIZE
Front = rear + 1
Rear = front
In Queue Insertion & Deletion take place at ________________.
same end
first end
different end
last end
One difference between a queue and a stack is:
Queues require dynamic memory, but stacks do not
Stacks require dynamic memory, but queues do not.
Queues use two ends of the structure; stacks use only one.
Stacks use two ends of the structure, queues use only one.
The situation when in a linked list Head==NULL
is
Full
Empty
Half full
saturated
The doubly linked list would have how many fields in a node?
1
2
3
4
Linked list is a collection of
Nodes
Arrays
Address
None
Node consists of
Address and Pointer
Data
Data and Address
Pointer and Address
Doubly Linked List Consists of
1-Data , 1- Address
2-Data , 1- Address
1-Data , 0- Address
1-Data , 2- Address
--------------------- is used to define a linked list in C Programming
Arrays
Structures
Functions
None
We can see linked list applications in
Movies
Library
Matrix Representation
Web Pages
Which the following circular linked list
