Data Structures and Algorithms — MCQ Practice

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

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

Question 16

EN + हिं Medium
GB Height of perfect binary tree with 15 nodes?
IN 15 नोड्स वाले पूर्ण बाइनरी ट्री की ऊंचाई?
2 2
3 3
4 4
5 5
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2^(h+1)-1=15 → 2^(h+1)=16 → h+1=4 → h=3.
व्याख्या (हिन्दी) 2^(h+1)-1=15 → 2^(h+1)=16 → h+1=4 → h=3.
🎯 Exam Perspective
Data Structures and Algorithms ("Trees" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 17

EN + हिं Medium
GB Maximum nodes in binary tree of height 4?
IN ऊंचाई 4 के बाइनरी ट्री में अधिकतम नोड्स?
15 15
31 31
16 16
8 8
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2^(4+1)-1=31.
व्याख्या (हिन्दी) 2^(4+1)-1=31.
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Trees" sub-topic) category का है — difficulty level "Medium", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 18

EN + हिं Medium
GB Number of leaf nodes in perfect binary tree of height h?
IN ऊँचाई h के पूर्ण बाइनरी वृक्ष में पत्ती नोड्स की संख्या?
2h 2 एच
h+1 एच+1
2^h 2^एच
2^(h-1) 2^(एच-1)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Leaf nodes in perfect binary tree of height h = 2^h.
व्याख्या (हिन्दी) ऊँचाई h = 2^h के पूर्ण बाइनरी ट्री में पत्ती नोड्स।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Trees" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 19

EN + हिं Medium
GB Preorder traversal used for?
IN प्रीऑर्डर ट्रैवर्सल का उपयोग किसके लिए किया जाता है?
Sorted output क्रमबद्ध आउटपुट
Creating copy of tree (serialization) पेड़ की प्रतिलिपि बनाना (क्रमबद्धता)
Deleting tree पेड़ हटाना
Finding height ऊंचाई ढूँढना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Preorder: root processed first — useful for serialization/copy.
व्याख्या (हिन्दी) प्रीऑर्डर: रूट को पहले संसाधित किया गया - क्रमबद्धता/कॉपी के लिए उपयोगी।
🎯 Exam Perspective
Data Structures and Algorithms ("Trees" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 20

EN + हिं Medium
GB Maximum leaf nodes in binary tree of height h?
IN ऊँचाई h के बाइनरी ट्री में अधिकतम पत्ती नोड्स?
2h 2 एच
h+1 एच+1
2^h 2^एच
h-1 एच-1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Maximum leaves = 2^h (perfect binary tree case).
व्याख्या (हिन्दी) अधिकतम पत्तियाँ = 2^एच (परफेक्ट बाइनरी ट्री केस)।
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Trees" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 21

EN + हिं Medium
GB Height of complete binary tree with 8 nodes?
IN 8 नोड्स वाले पूर्ण बाइनरी ट्री की ऊंचाई?
2 2
3 3
4 4
8 8
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) height=floor(log₂(8))=3.
व्याख्या (हिन्दी) ऊंचाई=मंजिल(लॉग₂(8))=3.
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Trees" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 22

EN + हिं Medium
GB After inserting 1,2,3 into AVL tree, which rotation?
IN AVL ट्री में 1,2,3 डालने के बाद कौन सा घुमाव?
LL डालूँगा
RR आरआर
LR एलआर
RL आर एल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Inserting 1,2,3 creates right-skewed tree — RR rotation balances it.
व्याख्या (हिन्दी) 1,2,3 डालने से दायीं ओर तिरछा पेड़ बनता है - आरआर रोटेशन इसे संतुलित करता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Trees" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 23

EN + हिं Medium
GB AVL tree LR rotation applied when?
IN एवीएल ट्री एलआर रोटेशन कब लागू किया गया?
New node in left of left child बाएँ बच्चे के बाएँ में नया नोड
New node in right of right child दाएँ बच्चे के दाएँ में नया नोड
New node in right of left child बाएँ बच्चे के दाएँ में नया नोड
New node in left of right child दाएँ बच्चे के बाएँ में नया नोड
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) LR: new node in right subtree of left child of unbalanced node.
व्याख्या (हिन्दी) एलआर: असंतुलित नोड के बाएं बच्चे के दाएं उपवृक्ष में नया नोड।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Trees" sub-topic) category का है — difficulty level "Medium", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 24

EN + हिं Medium
GB B-tree insertion always occurs at?
IN बी-ट्री इंसर्शन हमेशा कहां होता है?
Root जड़
Leaf level पत्ती का स्तर
Random यादृच्छिक
Internal nodes आंतरिक नोड्स
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B-tree insertion always at the leaf level (bottom-up approach).
व्याख्या (हिन्दी) बी-वृक्ष का सम्मिलन हमेशा पत्ती के स्तर पर (नीचे से ऊपर की ओर) होता है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Trees" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 25

EN + हिं Medium
GB Full B-tree node during insertion: operation performed?
IN सम्मिलन के दौरान पूर्ण बी-ट्री नोड: ऑपरेशन निष्पादित हुआ?
Delete node नोड हटाएँ
Split at median, push median up माध्यिका पर विभाजित करें, माध्यिका को ऊपर की ओर धकेलें
New sibling arbitrarily नया भाई मनमाने ढंग से
Rebuild from scratch खरोंच से पुनर्निर्माण करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Full node: split at median, median key goes up, create two children.
व्याख्या (हिन्दी) पूर्ण नोड: मध्य पर विभाजित, मध्य कुंजी ऊपर जाती है, दो बच्चे बनाते हैं।
🎯 Exam Perspective
Data Structures and Algorithms ("Trees" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 26

EN + हिं Medium
GB B-tree of order 5: minimum keys in non-root node?
IN क्रम 5 का बी-ट्री: गैर-रूट नोड में न्यूनतम कुंजियाँ?
1 1
2 2
3 3
4 4
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) ceil(m/2)-1 = ceil(5/2)-1 = 3-1 = 2 minimum keys.
व्याख्या (हिन्दी) ceil(m/2)-1 = ceil(5/2)-1 = 3-1 = 2 न्यूनतम कुंजियाँ।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Trees" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 27

EN + हिं Medium
GB Minimum degree t=2 B-tree: root has at least?
IN न्यूनतम डिग्री t=2 B-वृक्ष: जड़ में कम से कम?
t children टी बच्चे
2 children 2 बच्चे
No children needed बच्चों की जरूरत नहीं
m children एम बच्चे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B-tree root has at least 2 children (and minimum 1 key).
व्याख्या (हिन्दी) बी-ट्री रूट में कम से कम 2 बच्चे (और न्यूनतम 1 कुंजी) होते हैं।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Trees" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 28

EN + हिं Medium
GB In B-tree, keys within each node stored in?
IN बी-ट्री में, प्रत्येक नोड के भीतर कुंजियाँ किसमें संग्रहीत होती हैं?
Descending order अवरोही क्रम
Random order अनियमित क्रम
Increasing order बढ़ता क्रम
Alphabetical only केवल वर्णक्रमानुसार
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B-tree: keys within each node stored in increasing order.
व्याख्या (हिन्दी) बी-ट्री: प्रत्येक नोड के भीतर कुंजियाँ बढ़ते क्रम में संग्रहीत होती हैं।
🎯 Exam Perspective
Data Structures and Algorithms ("Trees" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 29

EN + हिं Medium
GB B-tree maximum height formula for n keys, order t?
IN एन कुंजी के लिए बी-ट्री अधिकतम ऊंचाई सूत्र, ऑर्डर टी?
n-1 एन-1
log_t((n+1)/2) log_t((n+1)/2)
n/2 एन/2
log₂(n) लॉग₂(एन)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Max height h >= log_t((n+1)/2).
व्याख्या (हिन्दी) अधिकतम ऊंचाई h >= log_t((n+1)/2).
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Trees" sub-topic) category का है — difficulty level "Medium", और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।