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 331

EN + हिं Medium
GB 2-3 tree is?
IN 2-3 पेड़ है?
Binary tree 2 or 3 children बाइनरी ट्री 2 या 3 बच्चे
B-tree of order 3 (each internal node 2 or 3 children) क्रम 3 का बी-ट्री (प्रत्येक आंतरिक नोड 2 या 3 बच्चे)
2 levels, 3 nodes 2 स्तर, 3 नोड
Exactly 3 leaves बिल्कुल 3 पत्ते
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2-3 tree: B-tree of order 3 — all leaves at same level.
व्याख्या (हिन्दी) 2-3 पेड़: क्रम 3 का बी-पेड़ - सभी पत्तियाँ समान स्तर पर।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 332

EN + हिं Medium
GB Python list.pop(0) vs list.pop() difference?
IN पायथन list.pop(0) बनाम list.pop() अंतर?
Both remove from end दोनों सिरे से हटा देते हैं
pop(0) removes front O(n); pop() removes end O(1) पॉप(0) सामने वाले O(n) को हटा देता है; पॉप() अंत O(1) को हटा देता है
pop(0) O(1); pop() O(n) पॉप(0) ओ(1); पर पॉप)
Identical समान
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) pop(0): O(n) due to shifting. pop(): O(1) from end.
व्याख्या (हिन्दी) पॉप(0): शिफ्टिंग के कारण O(n)। पॉप(): O(1) अंत से।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 333

EN + हिं Medium
GB deque.appendleft() equivalent to?
IN deque.appendleft() किसके बराबर है?
Enqueue at rear पीछे पंक्तिबद्ध करें
Push to stack स्टैक करने के लिए पुश करें
Insert at front of queue कतार के सामने डालें
Pop from front सामने से पॉप
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) deque.appendleft(x): O(1) insert at left/front.
व्याख्या (हिन्दी) deque.appendleft(x): O(1) बाएँ/सामने डालें।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 334

EN + हिं Medium
GB BTreeSearch returns if key not found?
IN यदि कुंजी नहीं मिली तो BTreeSearch वापस आ जाता है?
-1 -1
NIL (NULL) शून्य (शून्य)
False असत्य
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) BTreeSearch returns NIL when key not found (leaf reached without finding).
व्याख्या (हिन्दी) कुंजी नहीं मिलने पर BTreeSearch शून्य लौटाता है (पत्ता बिना खोजे पहुंच जाता है)।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 335

EN + हिं Medium
GB Merge step of merge sort for two halves of size n/2?
IN आकार n/2 के दो हिस्सों के लिए मर्ज सॉर्ट का मर्ज चरण?
O(1) हे(1)
O(log n) ओ(लॉग एन)
O(n) पर)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Merging two sorted halves of total size n takes O(n).
व्याख्या (हिन्दी) कुल आकार n के दो क्रमबद्ध हिस्सों को मिलाने पर O(n) प्राप्त होता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 336

EN + हिं Hard
GB Selection sort best case time complexity?
IN चयन प्रकार सर्वोत्तम केस समय जटिलता?
O(n) पर)
O(n log n) ओ(एन लॉग एन)
O(n²) ओ(एन²)
O(1) हे(1)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Selection sort is always O(n²) — always n(n-1)/2 comparisons.
व्याख्या (हिन्दी) चयन प्रकार हमेशा O(n²) होता है - हमेशा n(n-1)/2 तुलना।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Hard"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 337

EN + हिं Medium
GB Number of levels in merge sort for n=8?
IN n=8 के लिए मर्ज सॉर्ट में स्तरों की संख्या?
2 2
3 3
4 4
8 8
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) log₂(8)=3 levels in merge sort for 8 elements.
व्याख्या (हिन्दी) log₂(8)=8 तत्वों के लिए मर्ज सॉर्ट में 3 स्तर।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 338

EN + हिं Medium
GB mid in mergesort([5,9,10,1,66])?
IN मर्जसॉर्ट में मध्य([5,9,10,1,66])?
2 2
3 3
5 5
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) mid=5//2=2. left=[5,9], right=[10,1,66].
व्याख्या (हिन्दी) मध्य=5//2=2. बाएँ=[5,9], दाएँ=[10,1,66]।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 339

EN + हिं Medium
GB Result of quicksort([56,25,93,15,31,44])?
IN क्विकसॉर्ट का परिणाम([56,25,93,15,31,44])?
[93,56,44,31,25,15] [93,56,44,31,25,15]
[15,25,31,44,56,93] [15,25,31,44,56,93]
[15,44,25,31,56,93] [15,44,25,31,56,93]
[25,15,44,31,56,93] [25,15,44,31,56,93]
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Quicksort ascending: [15,25,31,44,56,93].
व्याख्या (हिन्दी) क्विकॉर्ट आरोही: [15,25,31,44,56,93]।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 340

EN + हिं Medium
GB In bubble sort after one pass on [9,16,6,26,0], result?
IN [9,16,6,26,0] पर एक पास के बाद बबल सॉर्ट में, परिणाम?
[9,6,16,0,26] [9,6,16,0,26]
[0,6,9,16,26] [0,6,9,16,26]
[6,9,16,0,26] [6,9,16,0,26]
[9,16,6,0,26] [9,16,6,0,26]
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) First pass: swap 16,6→[9,6,16,26,0]; swap 26,0→[9,6,16,0,26]. 26 at end.
व्याख्या (हिन्दी) पहला पास: स्वैप 16,6→[9,6,16,26,0]; स्वैप 26,0→[9,6,16,0,26]। अंत में 26.
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 341

EN + हिं Medium
GB Selection sort result on [5,3,7,1,9,6]?
IN [5,3,7,1,9,6] पर चयन क्रम परिणाम?
[9,7,6,5,3,1] [9,7,6,5,3,1]
[1,3,5,6,7,9] [1,3,5,6,7,9]
[3,5,1,6,7,9] [3,5,1,6,7,9]
[5,3,6,7,9,1] [5,3,6,7,9,1]
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Selection sort ascending: [1,3,5,6,7,9].
व्याख्या (हिन्दी) चयन क्रम आरोही: [1,3,5,6,7,9]।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Medium", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 342

EN + हिं Medium
GB Binary search on [12,24,32,39,45,50,54] for 45 returns?
IN 45 रिटर्न के लिए [12,24,32,39,45,50,54] पर बाइनरी खोज?
3 3
4 4
5 5
-1 -1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 45 is at index 4 (0-indexed).
व्याख्या (हिन्दी) 45 सूचकांक 4 (0-अनुक्रमित) पर है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 343

EN + हिं Medium
GB Stack output after push(Amar,Akbar,Anthony,Ram,Iqbal),pop()?
IN पुश के बाद स्टैक आउटपुट (अमर, अकबर, एंथोनी, राम, इकबाल), पॉप()?
Amar अमर
Anthony एंथोनी
Ram टक्कर मारना
Iqbal इकबाल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) LIFO: last pushed (Iqbal) is popped first.
व्याख्या (हिन्दी) LIFO: अंतिम धक्का (इकबाल) पहले पॉप किया गया है।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 344

EN + हिं Medium
GB Queue remaining after enqueue(A,B,C),dequeue(),enqueue(D),dequeue()?
IN एन्क्यू(ए,बी,सी),डेक्यू(),एनक्यू(डी),डेक्यू() के बाद कतार शेष है?
A,B ए,बी
C,D सी,डी
B,D बी,डी
A,D ए,डी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Remove A, then remove B. Remaining: C, D.
व्याख्या (हिन्दी) A हटाएँ, फिर B हटाएँ। शेष: C, D।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 345

EN + हिं Medium
GB Final stack after push(1),push(2),pop(),push(3),push(4),pop(),pop()?
IN पुश(1),पुश(2),पॉप(),पुश(3),पुश(4),पॉप(),पॉप() के बाद अंतिम स्टैक?
[1,3] [1,3]
[1,2,3] [1,2,3]
[1] [1]
[2,4] [2,4]
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) push1=[1];push2=[1,2];pop=[1];push3=[1,3];push4=[1,3,4];pop=[1,3];pop=[1].
व्याख्या (हिन्दी) पुश1=[1];पुश2=[1,2];पॉप=[1];पुश3=[1,3];पुश4=[1,3,4];पॉप=[1,3];पॉप=[1]।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।