Chap-7 Data Structures
Chap-7 Data Structures
unit.
Adata
structure is a named group of data of different data types which can be processed as asingle
primitive data types.
Simpledata structures are normally built from
to form compound data structures. The compound data
. Gimple data structures can be combined in various ways
structures may be linear (whose
elements form a sequence) and non-linear (which are multi-level).
deletions take
Astack is a linear structure implemented in
LIFO (Last In First Out) manner where insertions and
stack's top.
place only at one end i.e., the
An insertion in a stack is called pushing and a deletion from a stack is called popping.
A accommodated, it is called an
implemented as an array, is full and no new element can be
&When a stack,
OVERFLOW. UNDERFLOW.
and an element's deletion is tried from the stack, it is called an
When a stack is empty either before its operands (this form is
the operator symbol is placed
Polish string refers to the notation in which (this form is called postfix notation). The usual form, in which the
operands
called prefix notation) or after its operands, is called infix notation.
operator is placed in between the
OTQS
OBJECTIVE TYPE QUESTIONS
MULTIPLE CHOICE QUESTIONS
5.
refers to a situation (ERROR)when one tries to engueue/insert an item in a stack that is u
6.
refers to a situation (ERROR) when one tries to dequeue/delete an item from an empy sa
TRUE/FALSE QUESTIONS
1 Stacks can be implemented using lists.
end and
2. Lists
where controlled insertions and deletions take place such that insertions at the rear
deletions from the front end, are queues.
, Push and Pop are terms related to stack data structure.
implemented through stacks.
4 The postix conversion of an infix expression and recursion are internally
5 Pushing in afull fixed size stack results into an error.
6. Popping from an empty stack results into an error.
AsSERTIONS AND REASONS
DIRECTIONS
followed by a statement of Reason (R).
In the following questions, a statement of Assertion (A) is
Mark the correct choice as:
(a) Both A and R are true and R is the correct explanation of A.
explanation of A.
(b) Both A and R are true but R is not the correct
(c) Ais true but R is false (or partly true).
(e) Both A and R are false or not fully true.
(d) A is false (or partly true) but R is true.
elements.
named list of finite number of similar data
1. Assertion. A linear list refers to a
under one name make a linear list.
Reason. Similar type of elements grouped
list.
2. Assertion. A list having one or
more lists as its elements is called a nested
structure such as dictionaries or tuples, create
Reason. Two or more lists as part of another data
nested lists.
structure implemented in LIFO manner.
3. Assertion. A stack is a linear data elements
In stacks, the elements are processed in the reverse order of their insertion - the
Reason.
inserted lasts, are removed first.
LIFO structure.
4. Assertion (A), A stack is a
new element pushed into the stack always gets positioned at the index after the
Reason (R). Any [CBSE D 23]
last existing element in the stack.
structure implemented in FIFO manner.
5. Assertion. A queue is a linear data removal takes place at the front end.
rear end and the
Reason. In a queue, insertion takesplace at the manner.
Assertion. A stack is implemented in LIFO manner and a queue is implemented in FIFO
6.
manner through a special method.
Reason. A stack can be implemented in FIFO
storing and evaluating expressions.
7. Assertion. Stacks have found their applications in postfix
Reason. Postfix form of expression can be created using stacks and for evaluating
expressions also, the stacks are used.
NOTE given at the end of the book.
CHAPTER 7: DATA STRUCTURES
Multiple Choice Questions
1. (c) 2. (a) 3. (a) 4. (b) and (c) 5. (a) 6. (a)
7. (b) 8. (b) 9. (d) 10. (a) 11. (a) 12. (d)
13. (a) 14. (6) 15. (a)
Fill in the Blanks
1. datastructure 2. linear search 3. Last In First Out
True/False Questions
1. T 2. T 3. T 4. T 5. T 6. T