0% found this document useful (0 votes)
24 views

6 Data structures in python lesson 6

The document contains objective type questions related to data structures, specifically focusing on stacks and queues. It includes fill-in-the-blank questions, true or false statements, and multiple-choice questions to assess knowledge on data structure operations and properties. Key concepts such as LIFO, FIFO, push, pop, and queue operations are highlighted throughout.

Uploaded by

samasadul124
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)
24 views

6 Data structures in python lesson 6

The document contains objective type questions related to data structures, specifically focusing on stacks and queues. It includes fill-in-the-blank questions, true or false statements, and multiple-choice questions to assess knowledge on data structure operations and properties. Key concepts such as LIFO, FIFO, push, pop, and queue operations are highlighted throughout.

Uploaded by

samasadul124
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/ 6

OBJECTIVE TYPE QUESTIONS= wwwwseeiieeoddibeeesenn

1. Fill in the blanks.

(a) ... means organization of data.

(b) A data structure has well defined. . .. . . and


(c) A. is linear list, also known as LIFO list.
a

(d) A.. . is a mutable sequence of data elements indexed by their position. 6.19
visiting or processing each element of any data structure.
(e) .. means accessing or

is the term coined for insertion of elements in a Stack list.


() ..

(g) Consider the following operations done on Stack:


push(5)
push(8)
pop
push(2)
push(5)
pop
pop
pop
push(1)
pop
The output of the above snippet i
(h) In the Stack, if a user tries to remove an element from the empty Stack, it is called.
i) If the elements "A", "B", "C" and "D" are placed in a queue and are deleted one at a time, the order
in which they will be removed will be . ..... and.....

G) The process of inserting an element in a queue is called.. . . while deleting an element fronm
a queue is called....
statements are True or False.
2. State whether the following
data structure.
linear structure is a type of queue
(a) Single-ended of Stack.
Reversing a word/line is an application
(b)
deletion from a Stack takes place only from the TOP
(c) The insertion and
basis of LIFO principle.
(d) A queue behaves on the
When is implemented with the help of a list, it is termed as a linear a u e o
(e) a queue

(f) CPU uses queues to implement round-robin scheduling among waiting processes

(e) Deletion of element from the queue is termed as pop operation.


an
end.
(h) An element from a queue is added from the front
(i) Handling the processes of a network printer is the most important application of queue
.

inserts element at the rear end in a queue.


G) The function append() automatically an

(k) Stack is a linear data structure.


(0) PUSH operation may result in underflow condition.
3. Multiple Choice Questions (MCQs)
(a) The process of inserting an element in Stack is called:
(i) Create (ii) Push (ii) Evaluation (iv) Pop
(b) The process of removing an element from Stack is called:
(i) Create (i) Push (iii) Evaluation (iv) Pop
(c) In a Stack, if a user tries to remove an element from an empty Stack, the situation is called:
(i) Underflow (i) Empty collection
(iv) Garbage collection
(ii) Overflow
element into Stack already having five elements and a Stack of size 5, then the Stack
(d) Pushing an a

becomes:
(i) User flow ii) Crash (ii) Underflow (iv) Overflow

(e) Entries in a Stack are "ordered". What is the meaning of this statement?
(i) A collection of Stacks be sorted.
can

(ii) Stack entries may be compared with the '<operation.


(ii) The entries are stored in a linked list.
(iv) There is a Sequential entry that is one by one.

6.20
(f Which of the following applications may
use a Stack?

(i) A parentheses balancing program (ii) Tracking of local variables at run time
(ii) Compiler Syntax Analyzer (iv) All of the above
lp) Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
The maximum number of parentheses that appear on the Stack AT ANY ONE TIME when the algorithm
analyzes: (00)(0)) is:
(i) 1 (i) 2 (ii) 3 (iv) 4 or more

be done from end (front) and insertion can take


(h) A linear list of elements in which deletion can one

place only at the other end (rear) is known as a:

ii) Stack (ii) Tree (iv) Linked list


(i) Queue

(i) A queue is a:
Out) list (ii) LIFO (Last In First Out) list
(i) FIFO (First In First
(iv) Linear tree
(ii) Ordered array
Chapter-6
1. Fill in the blanks
(c) stack (d) list
(a) Data structure (b) operations, behaviour, properties
(e) Traversing () push (8) , empty list (h) Underflow of stack () A, B, C, D
G) Enqueue, dequeue
2. True or False:
(b) True (c) True (d) False (e) True (f) True g) False (h) False
(a) False
(i) True G) True (k) True ( False
3. Multiple Choice Questions (MCQs):
(a) (ii) (b) (iv) (c) () (d) (iv) (e) (iv) () (iv) (e) (i) (h) ()
() ()

You might also like