6 Data structures in python lesson 6
6 Data structures in python lesson 6
(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
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
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
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
(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) ()
() ()