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
1
EN + हिं Medium
GB Maximum children in binary tree?
IN बाइनरी ट्री में अधिकतम बच्चे?
A
1 1
B
3 3
C
Unlimited असीमित
D
2 2
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Binary tree: every node has at most 2 children.
व्याख्या (हिन्दी) बाइनरी ट्री: प्रत्येक नोड में अधिकतम 2 बच्चे होते हैं।
2
EN + हिं Easy
GB What is a full binary tree?
IN पूर्ण बाइनरी ट्री क्या है?
A
Every node one child प्रत्येक नोड एक बच्चा
B
Every node 2 children except leaves पत्तों को छोड़कर प्रत्येक नोड में 2 बच्चे हैं
C
Filled left to right बाएँ से दाएँ भरा हुआ
D
All leaves at level 0 सभी पत्ते 0 स्तर पर हैं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Full binary tree: every internal node has exactly 2 children.
व्याख्या (हिन्दी) पूर्ण बाइनरी ट्री: प्रत्येक आंतरिक नोड में ठीक 2 बच्चे होते हैं।
3
EN + हिं Easy
GB What is a complete binary tree?
IN पूर्ण बाइनरी ट्री क्या है?
A
Every node 2 children प्रत्येक नोड 2 बच्चे
B
Filled level-by-level left to right स्तर-दर-स्तर बाएँ से दाएँ भरा हुआ
C
No leaves कोई पत्तियां नहीं
D
Root has no parent रूट का कोई माता-पिता नहीं है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Complete binary tree: filled top-to-bottom, left-to-right.
व्याख्या (हिन्दी) पूरा बाइनरी ट्री: ऊपर से नीचे, बाएँ से दाएँ भरा हुआ।
4
EN + हिं Medium
GB Inorder traversal visits in order?
IN क्रम में ट्रैवर्सल विज़िट?
A
Root-Left-Right जड़-बाएँ-दाएँ
B
Left-Root-Right बाएँ-जड़-दाएँ
C
Left-Right-Root बाएँ-दाएँ-जड़
D
Level by level स्तर दर स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Inorder: Left → Root → Right.
व्याख्या (हिन्दी) क्रम में: बाएँ → मूल → दाएँ।
5
EN + हिं Medium
GB Preorder traversal visits in order?
IN क्रम में ट्रैवर्सल विज़िट का पूर्व-आदेश दें?
A
Left-Root-Right बाएँ-जड़-दाएँ
B
Root-Left-Right जड़-बाएँ-दाएँ
C
Left-Right-Root बाएँ-दाएँ-जड़
D
Level by level स्तर दर स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Preorder: Root → Left → Right.
व्याख्या (हिन्दी) प्रीऑर्डर: रूट → लेफ्ट → राइट।
6
EN + हिं Medium
GB Postorder traversal visits in order?
IN ऑर्डर के बाद ट्रैवर्सल विज़िट क्रम में हैं?
A
Left-Root-Right बाएँ-जड़-दाएँ
B
Root-Left-Right जड़-बाएँ-दाएँ
C
Left-Right-Root बाएँ-दाएँ-जड़
D
Level by level स्तर दर स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Postorder: Left → Right → Root.
व्याख्या (हिन्दी) पोस्टऑर्डर: बाएँ → दाएँ → रूट।
7
EN + हिं Medium
GB AVL tree is?
IN एवीएल वृक्ष है?
A
Binary tree every node 2 children बाइनरी ट्री प्रत्येक नोड 2 बच्चे
B
Height-balanced BST; balance factor -1,0,+1 ऊंचाई-संतुलित बीएसटी; संतुलन कारक -1,0,+1
C
Random ordering यादृच्छिक आदेश
D
More than 2 children 2 से अधिक बच्चे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) AVL tree: self-balancing BST with balance factor -1, 0, or +1.
व्याख्या (हिन्दी) एवीएल ट्री: संतुलन कारक -1, 0, या +1 के साथ स्व-संतुलन बीएसटी।
8
EN + हिं Medium
GB Balance factor in AVL tree?
IN एवीएल वृक्ष में संतुलन कारक?
A
Height of root - leaf जड़-पत्ती की ऊंचाई
B
Height of left - height of right subtree बाएँ की ऊँचाई - दाएँ उपवृक्ष की ऊँचाई
C
Left nodes - right nodes बाएँ नोड्स - दाएँ नोड्स
D
Depth - level गहराई - स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Balance factor = height(left subtree) - height(right subtree).
व्याख्या (हिन्दी) संतुलन कारक = ऊँचाई (बायाँ उपवृक्ष) - ऊँचाई (दायाँ उपवृक्ष)।
9
EN + हिं Medium
GB AVL tree introduced by?
IN AVL वृक्ष किसके द्वारा प्रस्तुत किया गया?
A
Dijkstra and Bellman दिज्क्स्ट्रा और बेलमैन
B
G.M. Adelson-Velsky and E.M. Landis जी.एम. एडेलसन-वेल्स्की और ई.एम. लैंडिस
C
Knuth and Floyd नुथ और फ्लॉयड
D
Prim and Kruskal प्राइम और क्रुस्कल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) AVL = Adelson-Velsky and Landis (1962).
व्याख्या (हिन्दी) एवीएल = एडेलसन-वेल्स्की और लैंडिस (1962)।
10
EN + हिं Medium
GB How many rotation types in AVL tree?
IN AVL ट्री में कितने रोटेशन प्रकार होते हैं?
A
2 2
B
3 3
C
4 4
D
5 5
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 4 rotations: LL, RR, LR, RL.
व्याख्या (हिन्दी) 4 रोटेशन: एलएल, आरआर, एलआर, आरएल।
11
EN + हिं Medium
GB B-tree is?
IN बी-वृक्ष है?
A
Binary tree 2 children बाइनरी ट्री 2 बच्चे
B
Self-balancing, each node can have more than 2 children स्व-संतुलन, प्रत्येक नोड में 2 से अधिक बच्चे हो सकते हैं
C
Binary used only in DB बाइनरी का उपयोग केवल DB में किया जाता है
D
Exactly 3 children बिल्कुल 3 बच्चे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B-tree: self-balancing search tree with multiple keys/children per node.
व्याख्या (हिन्दी) बी-ट्री: प्रति नोड एकाधिक कुंजी/बच्चों के साथ स्व-संतुलन खोज ट्री।
12
EN + हिं Medium
GB B-tree was invented to?
IN बी-ट्री का आविष्कार कहाँ हुआ था?
A
Handle in-memory sorting इन-मेमोरी सॉर्टिंग को संभालें
B
Minimize disk accesses in secondary storage सेकेंडरी स्टोरेज में डिस्क एक्सेस कम से कम करें
C
Replace arrays सरणियाँ बदलें
D
Support doubly linked lists दोहरी रूप से लिंक की गई सूचियों का समर्थन करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B-trees minimize disk I/O — keep height low with more keys per node.
व्याख्या (हिन्दी) बी-ट्री डिस्क I/O को न्यूनतम करते हैं - प्रति नोड अधिक कुंजियों के साथ ऊंचाई कम रखते हैं।
13
EN + हिं Medium
GB In B-tree of order m, each internal node has at most how many keys?
IN ऑर्डर एम के बी-ट्री में, प्रत्येक आंतरिक नोड में अधिकतम कितनी कुंजियाँ होती हैं?
A
m एम
B
m+1 एम+1
C
m-1 एम-1
D
2m 2मी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) At most m-1 keys and m children per internal node.
व्याख्या (हिन्दी) अधिकतम एम-1 कुंजियाँ और प्रति आंतरिक नोड एम बच्चे।
14
EN + हिं Medium
GB B-tree: all leaves are at?
IN बी-वृक्ष: सभी पत्तियाँ कहाँ पर हैं?
A
Different levels अलग - अलग स्तर
B
Same level (same depth) समान स्तर (समान गहराई)
C
Level 0 स्तर 0
D
Level 1 स्तर 1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B-tree all leaves at same depth — height-balanced.
व्याख्या (हिन्दी) बी-वृक्ष की सभी पत्तियाँ समान गहराई पर - ऊँचाई-संतुलित।
15
EN + हिं Hard
GB Key difference B-tree vs B+ tree?
IN बी-ट्री बनाम बी+ ट्री में मुख्य अंतर?
A
B+ always unbalanced B+ सदैव असंतुलित रहता है
B
B+ stores data only at leaves; B-tree at all nodes B+ डेटा को केवल पत्तों पर संग्रहीत करता है; सभी नोड्स पर बी-ट्री
C
B-tree uses more memory बी-ट्री अधिक मेमोरी का उपयोग करता है
D
B+ smaller order बी+ छोटा ऑर्डर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B+ tree: data pointers only at leaf nodes; B-tree: data at all levels.
व्याख्या (हिन्दी) बी+ ट्री: केवल लीफ नोड्स पर डेटा पॉइंटर्स; बी-ट्री: सभी स्तरों पर डेटा।
1–15 of 29