Data Structures and Algorithms — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye.

📚 819 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
819 questions

Question 46

EN + हिं Medium
GB Which algorithm is most efficient for nearly sorted data?
IN लगभग क्रमबद्ध डेटा के लिए कौन सा एल्गोरिदम सबसे कुशल है?
Quick sort त्वरित छँटाई
Merge sort मर्ज सॉर्ट
Insertion sort सम्मिलन प्रकार
Selection sort चयन छांटना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Insertion sort achieves close to O(n) for nearly sorted data.
व्याख्या (हिन्दी) लगभग क्रमबद्ध डेटा के लिए सम्मिलन सॉर्ट O(n) के करीब पहुंच जाता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 47

EN + हिं Medium
GB Counting sort is best for:
IN गिनती क्रम इनके लिए सर्वोत्तम है:
Large floating point numbers बड़े फ़्लोटिंग पॉइंट नंबर
Integers with small known range छोटी ज्ञात सीमा वाले पूर्णांक
Strings only केवल तार
Very large unordered sets बहुत बड़े अव्यवस्थित सेट
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Counting sort achieves O(n+k) for integers in a known small range.
व्याख्या (हिन्दी) ज्ञात छोटी श्रेणी में पूर्णांकों के लिए गणना सॉर्ट O(n+k) प्राप्त करता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Medium", और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 48

EN + हिं Medium
GB Python's list.sort() vs sorted(list) — key difference?
IN पायथन की list.sort() बनाम sorted(list) — मुख्य अंतर?
Both return new list दोनों नई सूची लौटाते हैं
list.sort() in-place; sorted() returns new list list.sort() यथास्थान; sorted() नई सूची लौटाता है
sorted() in-place; list.sort() returns new सॉर्ट किया गया() इन-प्लेस; list.sort() नया लौटाता है
Identical समान
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) list.sort() modifies in-place; sorted() returns new sorted list.
व्याख्या (हिन्दी) list.sort() यथास्थान संशोधित करता है; sorted() नई क्रमबद्ध सूची लौटाता है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 49

EN + हिं Medium
GB Operation to add element to stack?
IN स्टैक में तत्व जोड़ने के लिए ऑपरेशन?
Enqueue कतारबद्ध करें
Insert डालना
Push धकेलना
Add जोड़ना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Push adds an element to the top of the stack.
व्याख्या (हिन्दी) पुश स्टैक के शीर्ष पर एक तत्व जोड़ता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 50

EN + हिं Medium
GB Operation to remove element from stack?
IN स्टैक से तत्व को हटाने के लिए ऑपरेशन?
Dequeue विपंक्ति
Delete मिटाना
Remove निकालना
Pop जल्दी से आना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Pop removes and returns the top element of the stack.
व्याख्या (हिन्दी) पॉप स्टैक के शीर्ष तत्व को हटाता है और लौटाता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 51

EN + हिं Medium
GB Python list method to push onto stack?
IN स्टैक पर पुश करने के लिए पायथन सूची विधि?
add() जोड़ना()
insert() डालना()
append() जोड़ें()
push() धकेलना()
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) list.append() adds to end — simulates stack push.
व्याख्या (हिन्दी) list.append() अंत में जोड़ता है - स्टैक पुश का अनुकरण करता है।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 52

EN + हिं Medium
GB Python list method to pop from stack?
IN स्टैक से पॉप करने के लिए पायथन सूची विधि?
remove() निकालना()
pop() जल्दी से आना()
delete() मिटाना()
dequeue() कतार()
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) list.pop() removes and returns last element — simulates stack pop.
व्याख्या (हिन्दी) list.pop() अंतिम तत्व को हटाता है और लौटाता है - स्टैक पॉप का अनुकरण करता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 53

EN + हिं Medium
GB Error when popping from empty stack?
IN खाली स्टैक से पॉपिंग करते समय त्रुटि?
Queue Overflow कतार अतिप्रवाह
Stack Underflow स्टैक अंडरफ़्लो
Memory Leak मेमोरी लीक
Index Error अनुक्रमणिका त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Stack Underflow: popping from empty stack.
व्याख्या (हिन्दी) स्टैक अंडरफ्लो: खाली स्टैक से पॉपिंग।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 54

EN + हिं Medium
GB Error when pushing to full array-based stack?
IN पूर्ण सरणी-आधारित स्टैक पर पुश करते समय त्रुटि?
Stack Underflow स्टैक अंडरफ़्लो
Queue Overflow कतार अतिप्रवाह
Stack Overflow स्टैक ओवरफ़्लो
Memory Error स्मृति त्रुटि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Stack Overflow: pushing to a full stack.
व्याख्या (हिन्दी) स्टैक ओवरफ़्लो: पूर्ण स्टैक की ओर धकेलना।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 55

EN + हिं Easy
GB What does peek() do on a stack?
IN पीक() स्टैक पर क्या करता है?
Removes top element शीर्ष तत्व को हटा देता है
Returns top without removing बिना हटाए शीर्ष पर लौट आता है
Checks if empty जाँचता है कि क्या खाली है
Adds to bottom नीचे जोड़ता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) peek() returns top element without removing it.
व्याख्या (हिन्दी) peek() शीर्ष तत्व को हटाए बिना लौटाता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Easy" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 56

EN + हिं Hard
GB Time complexity of push and pop on a stack?
IN स्टैक पर पुश और पॉप की समय जटिलता?
O(n) पर)
O(log n) ओ(लॉग एन)
O(1) हे(1)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Both push and pop are O(1) — constant time.
व्याख्या (हिन्दी) पुश और पॉप दोनों O(1) हैं - स्थिर समय।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Hard"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 57

EN + हिं Easy
GB Real-world example of a stack?
IN स्टैक का वास्तविक-विश्व उदाहरण?
Ticket queue टिकट की कतार
Pile of plates प्लेटों का ढेर
Circular track वृत्ताकार पथ
Priority boarding प्राथमिकता बोर्डिंग
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Pile of plates: last placed is first used (LIFO).
व्याख्या (हिन्दी) प्लेटों का ढेर: अंतिम स्थान पर रखा गया पहला उपयोग किया जाता है (LIFO)।
🎯 Exam Perspective
अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 58

EN + हिं Hard
GB Evaluate postfix '2 3 + 4 *':
IN उपसर्ग '2 3 + 4 *' का मूल्यांकन करें:
8 8
14 14
20 20
10 10
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2+3=5; 5*4=20. Result=20.
व्याख्या (हिन्दी) 2+3=5; 5*4=20. परिणाम=20.
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Hard" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 59

EN + हिं Medium
GB Minimum stacks needed to implement a queue?
IN कतार लागू करने के लिए न्यूनतम ढेर की आवश्यकता है?
1 1
2 2
3 3
4 4
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2 stacks: one for enqueue, one for dequeue.
व्याख्या (हिन्दी) 2 ढेर: एक कतार के लिए, एक कतार के लिए।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Medium", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 60

EN + हिं Medium
GB Infix A+B*C in postfix is?
IN पोस्टफिक्स में इनफिक्स A+B*C है?
+A*BC +ए*बीसी
ABC*+ एबीसी*+
AB+C* एबी+सी*
A+BC* ए+बीसी*
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Operator precedence: B*C first, then +A. Postfix: ABC*+
व्याख्या (हिन्दी) ऑपरेटर प्राथमिकता: पहले B*C, फिर +A। पोस्टफिक्स: एबीसी*+
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।