0% found this document useful (0 votes)
70 views42 pages

50 Data Structure

Uploaded by

mdafsarurdu90
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)
70 views42 pages

50 Data Structure

Uploaded by

mdafsarurdu90
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

(BPSC + STET) Computer Science

Welcome Everyone Arora Educator


“Arora Educator” Official Platform
By : Sachin Arora Sir
Founder : AE (Arora Educator)
WhatsApp : 97 606 89 846
Arora Educator
Arora Educator : Stay Connected
YouTube Channel Link –
https://www.youtube.com/@AroraEducator/
Telegram Link –
https://t.me/AroraEducatorChannel
Instagram Link –
https://www.instagram.com/aroraeducator.official/
Arora Educator App Link –
https://play.google.com/store/apps/details?id=co.stan.xsjqp
Data Structure Arora Educator
Linear Data Structure = रै खिक डेटा संरचना Arora Educator
Stack –
Infix Notation→ Postfix Notation Arora Educator
Q.1. Infix = A + B * C
Find Postfix ? 1. (){}[] → Left to Right
2. ^ → Right to Left
Ans = 3. */ → Left to Right
A+B*C 4. +- → Left to Right

A+(B*C)
(A) + (B C *)
A B C * + = Postfix
Infix Notation→ Postfix Notation Arora Educator

Q.2. Infix = (A + B) - C 1. (){}[] → Left to Right


Find Postfix ? 2. ^ → Right to Left
3. */ → Left to Right
Ans = 4. +- → Left to Right
(A + B) - C
(AB+) - (C)
AB+C- = Postfix
Infix Notation→ Postfix Notation Arora Educator

Q.3. Infix = ( A + B ) * ( C - D )
Find Postfix ? 1. (){}[] → Left to Right
Ans = 2. ^ → Right to Left
3. */ → Left to Right
(A + B) * ( C - D ) 4. +- → Left to Right
AB+ * CD-
AB+CD-* = Postfix
Postfix Notation→ Prefix Notation Arora Educator

Q.1. Postfix = (A+B) * (C+D)


Find Prefix ? 1. (){}[] → Left to Right
Ans = 2. ^ → Right to Left
3. */ → Left to Right
(A + B) * ( C + D ) 4. +- → Left to Right
+AB * +CD
*(+AB+CD)
*+AB+CD = Prefix
Postfix Notation→ Prefix Notation Arora Educator

Q.2. Postfix = AB+CD-*


Find Prefix ? 1. (){}[] → Left to Right
2. ^ → Right to Left
Ans = 3. */ → Left to Right
(AB+CD-)* 4. +- → Left to Right
* (AB+)(CD-)
*+AB(CD-)
*+AB-CD
Postfix Notation→ Prefix Notation Arora Educator

Q.3. Postfix = AB*CD/+


Find Prefix ? 1. (){}[] → Left to Right
Ans = 2. ^ → Right to Left
3. */ → Left to Right
(AB*)(CD/)+ 4. +- → Left to Right
(*AB)(/CD)+
+(*AB)(/CD)
+*AB/CD
Q.1. Stack is ____.? Arora Educator
स्टै क ____ है ?
1) Dynamic data structure
2) Constantly changing object
3) An ordered collection of items
4) All of the above
5) None of these
Q.2. Process of inserting an element in stack is called.?
स्टै क में ककसी तत्व को सम्ममलित करने की प्रकिया को क्या
कहा जाता है ? Arora Educator
1) Create
2) Push
3) Evaluation
4) Pop
5) All of these
Q.3. Process of removing an element from stack is called.?
स्टै क से ककसी तत्व को हटाने की प्रकिया को क्या कहा जाता
है ? Arora Educator
1) Create
2) Push
3) Evaluation
4) Pop
5) None of these
Q.4. In a stack, if a user tries to remove an element from an
empty stack it is called?
ककसी स्टै क में , यदि कोई उपयोगकताा िािी स्टै क से ककसी
तत्व को हटाने का प्रयास करता है तो उसे क्या कहा जाता
है ? Arora Educator
1) Underflow
2) Empty collection
3) Overflow
4) Garbage Collection
5) None of these
Q.5. Pushing an element into stack already having five
elements and stack size of 5, then stack becomes.?
एक तत्व को स्टै क में धकेिना म्जसमें पहिे से ही पांच तत्व
हैं और स्टै क का आकार 5 है , तो स्टै क बन जाता है ?
Arora Educator
1) Overflow
2) Crash
3) Underflow
4) User flow
5) All of these
Q.6. Stack can be implement using queue, but then we need
to use at least ____ queue.?
स्टै क को क्यू का उपयोग करके िागू ककया जा सकता है ,
िेककन किर हमें कम से कम ____ क्यू का उपयोग करने की
आवश्यकता है ? Arora Educator
1) 1 Queue
2) 2 Queue
3) 3 Queue
4) 4 Queue
5) More than one of the above
Q.7. LIFO order is used in which of the following data
structure.?
LIFO ऑडार का उपयोग ननमनलिखित में से ककस डेटा संरचना
में ककया जाता है ? Arora Educator
1) Array
2) Stack
3) Queue
4) Trees
5) All of these
Q.8. What is the primary function of a Stack data structure.?
स्टै क डेटा संरचना का प्राथलमक काया क्या है ? Arora Educator
1) LIFO operations
2) FIFO operations
3) Both LIFO and FIFO operations
4) None of the above
5) Either 1 or 2
Q.9. What is the maximum number of elements a Stack can
hold.?
एक स्टै क में तत्वों की अधधकतम संख्या ककतनी हो सकती
है ? Arora Educator
1) Stack can hold a limited number of
elements
2) Stack can hold an infinite number of
elements
3) It depends on the memory available
4) It depends on the data type of the
elements
5) None of these
Q.10. Which of the following applications may use a Stack?
ननमनलिखित में से कौन सा एम्लिकेशन स्टै क का उपयोग कर
सकता है ? वह प्रकिया म्जसमें प्रोग्राम कोड Arora Educator
के एक ननम्श्चत अनभ ु ाग को
1) Recursion समान तरीके से िोहराता है ,
2) Parsing ररकसान कहिाता है ।
3) Browser history
4) All of the above
5) None of these
the process in which the program
repeats a certain section of code in
a similar way is called recursion.
Q.11. What is another name for the top of the Stack?
स्टै क के शीर्ा का िस
ू रा नाम क्या है ? Arora Educator
1) Head
2) Front
3) Rear
4) Peak
5) All of these
Q.12. The data structure required to check whether an
expression contains balanced parenthesis is.?
यह जांचने के लिए आवश्यक डेटा संरचना है कक क्या ककसी
अलभव्यम्क्त में संतुलित कोष्ठक है ? Arora Educator
1) Stack
2) Queue
3) Array
4) Tree
5) All of these
Q.13. Which data structure is needed to convert infix
notation to postfix notation?
इम्फ़िक्स नोटे शन को पोस्टक़िक्स नोटे शन में बििने के लिए
ककस डेटा संरचना की आवश्यकता है ? Arora Educator
1) Stack
2) Queue
3) Array
4) Tree
5) None of these
Q.14. Which data structure is used for implementing
recursion?
ररकसान िागू करने के लिए ककस डेटा संरचना का उपयोग
ककया जाता है ? Arora Educator
1) Stack Recursion is the process
2) Queue in which a function calls
3) Array itself again and again
4) Tree
5) All of these
Q.15. The type of expression in which operator succeeds its
operands is?
अलभव्यम्क्त का वह प्रकार है म्जसमें ऑपरे टर अपने ऑपरें ड
को सिि करता है ? Arora Educator
1) Infix Expression
2) pre fix Expression
3) postfix Expression
4) All of these
5) None of these
Q.16. If the elements “A”, “B”, “C” and “D” are placed in a
stack and are deleted one at a time, in what order will they
be removed?
यदि तत्व "ए", "बी", "सी" और "डी" को एक स्टै क में रिा
जाता है और एक समय में हटा दिया जाता है , तो उफहें ककस
िम में हटाया जाएगा? Arora Educator
1) ABCD
2) DCBA
3) DCAB
4) ABDC
5) None of these
Q.17. Stack is a.? Arora Educator
स्टै क एक है ?
1) Static Data Structure
2) Dynamic Data Structure
3) Inbuilt Data Structure
4) All of these
5) None of these
Q.18. The following sequence of the operations is
performed on a stack.?
PUSH(10), PUSH(20), POP, PUSH(10), PUSH(20), POP, POP,
POP, PUSH(20),POP Arora Educator
POP the sequence of values popped out is
1) 20,10,20,10,20 20
20 10 10
2) 20,20,10,20,10 10 10
10 10 10 10 - 20 -
3) 20,20,10,10,20
4) 10,20,20,10,20
5) None of these
Q.19. What will be the sequence of numbers, if the following
operations are performed on a stack .?
PUSH(5), PUSH(7), POP(), PUSH(8), PUSH(6), POP(), POP(),
POP(). The sequence of values popped out is Arora Educator
1) 5,8,6,7 6
2) 7,6,5,8 7 8 8
3) 6,7,8,5 5 5 5 5 5 5 -
4) 7,6,8,5
5) None of these
Q.20. Which element would get first deleted from the stack?
कौन सा तत्व सबसे पहिे स्टै क से हटाया जाएगा?
Arora Educator
1) The element in the middle of the stack
2) Any specified element
3) The element at the bottom of the stack
4) The element at the top of the stack
5) None of these
Q.21. In a stack we can access the element.? Arora Educator
एक स्टै क में हम तत्व तक पहुंच सकते हैं?
1) Which is entered at beginning
2) From any position
3) Which is entered at last
4) All of these
5) None of these
Q.22. Any arithmetic expression can be represented in any of
the notation.?
ककसी भी अंकगखितीय अलभव्यम्क्त को ककसी भी अंकन में
िशााया जा सकता है ? Arora Educator
1) Infix
2) Prefix
3) Postfix
4) All the above
5) None of these
Q.23. x+y can be written as xy+. This is called.?
x+y को xy+ के रूप में लििा जा सकता है । यह कहा जाता है ?
1) reverse polish notation Arora Educator
2) postfix notation
3) prefix notation
4) (1) and (2)
5) None of these
Q.24. The postfix form of A*B+C/D is? Arora Educator
A*B+C/D का उपसगा रूप है ?

1) *AB/CD+ 1. (){}[] → Left to Right


2) AB*CD/+ 2. ^ → Right to Left
3. */ → Left to Right
3) A*BC+/D
4. +- → Left to Right
4) ABCD+/*
5) None of these
The postfix form of A*B+C/D is Arora Educator
1. (){}[] → Left to Right
(A*B)+(C/D) 2. ^ → Right to Left
3. */ → Left to Right
(AB*)+(CD/) 4. +- → Left to Right
(AB*)(CD/)+
AB*CD/+
Q.25. Which of the following statement(s) about stack data
structure is/are NOT correct?
स्टै क डेटा संरचना के बारे में ननमनलिखित में से कौन सा
कथन सही नहीं है /हैं? Arora Educator
1) Stack data structure can be
implemented using linked list
2) New node can only be added at the top
of the stack
3) Stack is the FIFO data structure
4) The last node at the bottom of the stack
has a NULL link
5) None of these
Q.26. 7 9 3 + 4 / * The evaluation of the above postfix
expression is.? Arora Educator
793+4/*
उपरोक्त पोस्टक़िक्स अलभव्यम्क्त का मल ू यांकन है ?
1) 10
2) 49
+ /
3) 9
4) 21
33 4 4 *
5) 25 9 9 9 12 12 12 3 3
77 7 77 7 7 7 7 21
Q.27. Stack is a ? Arora Educator
स्टै क एक है ?
1) First In Random Out structure
2) Last In First Out structure
3) First In First Out structure
4) Last in Last Out structure
5) None of these
Q.28. Stack can store ___ data type.? Arora Educator
स्टै क ___ डेटा प्रकार को स्टोर कर सकता है ?
1) Heterogeneous 1) ववजातीय
2) Homogeneous 2) सजातीय
3) Collection of elements of 3) समान डेटा प्रकार के तत्वों
का संग्रह
the same data type
4) रैंडम एक्सेस
4) Random-access
5) None of these
Disadvantage of Stack / स्टै क का नक
ु सान Arora Educator
✓ In Stack, random access is not
possible. (स्टै क में रैंडम एक्सेस
संभव नहीं है ।)
✓ Creating too many objects on the
stack can increase the risk of stack
overflow. (स्टै क पर बहुत अधधक
ऑब्जेक्ट बनाने से स्टै क ओवरफ्िो
का ितरा बढ़ सकता है ।)
Key Operations on Stack Data Structures Arora Educator
1) Push = Adds an element to the top
of the stack.
2) Pop = Removes the top element
from the stack.
3) Peek = Returns the top element
without removing it.
4) IsEmpty = Checks if the stack is
empty.
5) IsFull = Checks if the stack is full (in
case of fixed-size arrays).
Arora Educator
Arora Educator : Stay Connected
YouTube Channel Link –
https://www.youtube.com/@AroraEducator/
Telegram Link –
https://t.me/AroraEducatorChannel
Instagram Link –
https://www.instagram.com/aroraeducator.official/
Arora Educator App Link –
https://play.google.com/store/apps/details?id=co.stan.xsjqp

You might also like