Data Structures and Algorithms — MCQ Practice

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

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

Question 76

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 के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 77

EN + हिं Hard
GB Radix sort time complexity?
IN रेडिक्स सॉर्ट समय जटिलता?
O(n log n) ओ(एन लॉग एन)
O(n²) ओ(एन²)
O(nk) where k=number of digits O(nk) जहां k=अंकों की संख्या
O(n) पर)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Radix sort: O(nk) where n=elements, k=digits in max element.
व्याख्या (हिन्दी) मूलांक प्रकार: O(nk) जहां n=तत्व, k=अधिकतम तत्व में अंक।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Hard", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 78

EN + हिं Medium
GB After sorting [5,3,7,1,9,6] using selection sort, first element placed?
IN चयन सॉर्ट का उपयोग करके [5,3,7,1,9,6] सॉर्ट करने के बाद, पहला तत्व रखा गया?
5 5
3 3
1 1
7 7
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Min of [5,3,7,1,9,6]=1, swapped to index 0.
व्याख्या (हिन्दी) [5,3,7,1,9,6]=1 का न्यूनतम, सूचकांक 0 पर बदल दिया गया।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 79

EN + हिं Hard
GB How many passes does bubble sort need worst case for n elements?
IN एन तत्वों के लिए सबसे खराब स्थिति में बबल सॉर्ट को कितने पास की आवश्यकता होती है?
n एन
n/2 एन/2
n-1 एन-1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) n-1 passes needed in worst case (reverse sorted).
व्याख्या (हिन्दी) सबसे खराब स्थिति में n-1 पास की आवश्यकता होती है (रिवर्स सॉर्ट किया गया)।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Hard" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 80

EN + हिं Medium
GB In quick sort, elements smaller than pivot go to:
IN त्वरित क्रम में, धुरी से छोटे तत्व यहां जाते हैं:
Right side दाहिनी ओर
Both sides दोनों पक्षों
Left side बाईं तरफ
Random side यादृच्छिक पक्ष
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Elements < pivot → left partition; elements > pivot → right partition.
व्याख्या (हिन्दी) तत्व < धुरी → बायां विभाजन; तत्व > धुरी → दायां विभाजन।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 81

EN + हिं Easy
GB In insertion sort, what does pos=pos-1 do?
IN सम्मिलन प्रकार में, pos=pos-1 क्या करता है?
Moves to next element अगले तत्व पर ले जाता है
Moves position left to find insertion spot सम्मिलन स्थान ढूंढने के लिए स्थिति को बाईं ओर ले जाता है
Deletes current वर्तमान हटाता है
Increments outer loop बाहरी लूप को बढ़ाता है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) pos=pos-1 moves left to compare with previous sorted element.
व्याख्या (हिन्दी) pos=pos-1 पिछले क्रमबद्ध तत्व के साथ तुलना करने के लिए बाईं ओर चलता है।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 82

EN + हिं Medium
GB Stack follows which principle?
IN स्टैक किस सिद्धांत का पालन करता है?
FIFO फीफो
LIFO जीवन
FILO FILO
Random access यादृच्छिक पहुंच
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Stack: LIFO — Last In First Out.
व्याख्या (हिन्दी) स्टैक: LIFO - लास्ट इन फर्स्ट आउट।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 83

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 category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 84

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
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 85

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
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 86

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
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 87

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
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 88

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 के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 89

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 category का है — difficulty level "Easy", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 90

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
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Hard"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।