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 211

EN + हिं Medium
GB Tree degree?
IN वृक्ष की डिग्री?
Height ऊंचाई
Number of leaves पत्तों की संख्या
Maximum of all node degrees सभी नोड डिग्री में से अधिकतम
Number of edges किनारों की संख्या
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Tree degree = maximum degree among all nodes.
व्याख्या (हिन्दी) ट्री डिग्री = सभी नोड्स के बीच अधिकतम डिग्री।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 212

EN + हिं Medium
GB Which traversal used for tree deletion (delete children before parent)?
IN पेड़ हटाने (पैरेंट से पहले बच्चों को हटाएं) के लिए किस ट्रैवर्सल का उपयोग किया जाता है?
Preorder पूर्व आदेश
Inorder क्रम में
Postorder पोस्ट ऑर्डर
Level-order स्तर से आदेश
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Postorder (L-R-Root) used for deletion — children deleted before parent.
व्याख्या (हिन्दी) हटाने के लिए पोस्टऑर्डर (एल-आर-रूट) का उपयोग किया जाता है - बच्चों को माता-पिता से पहले हटा दिया जाता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 213

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

Question 214

EN + हिं Easy
GB What is a degenerate BST?
IN पतित BST क्या है?
Balanced BST संतुलित बीएसटी
All nodes have one child (skewed like linked list) सभी नोड्स में एक बच्चा होता है (लिंक्ड सूची की तरह तिरछा)
No leaves कोई पत्तियां नहीं
Complete binary tree पूरा बाइनरी ट्री
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Degenerate BST: all nodes on one side — degenerates to linked list.
व्याख्या (हिन्दी) डिजेनरेट बीएसटी: सभी नोड्स एक तरफ - लिंक की गई सूची में डिजेनरेट हो जाते हैं।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Easy" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 215

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

Question 216

EN + हिं Medium
GB In BST, all operations on balanced tree?
IN बीएसटी में, संतुलित वृक्ष पर सभी परिचालन?
O(n) पर)
O(log n) ओ(लॉग एन)
O(1) हे(1)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) All BST operations (search/insert/delete) on balanced tree = O(log n).
व्याख्या (हिन्दी) संतुलित ट्री पर सभी बीएसटी ऑपरेशन (खोज/डालें/हटाएं) = ओ(लॉग एन)।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 217

EN + हिं Medium
GB Siblings in tree are nodes that?
IN पेड़ में भाई-बहन नोड हैं कि?
Have no children कोई संतान नहीं है
Share same parent समान अभिभावक साझा करें
Same height वही ऊंचाई
Connected by edge किनारे से जुड़ा हुआ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Siblings share the same parent node.
व्याख्या (हिन्दी) भाई-बहन एक ही मूल नोड साझा करते हैं।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 218

EN + हिं Medium
GB Ancestors of a node are?
IN एक नोड के पूर्वज हैं?
Same level nodes समान स्तर के नोड्स
On path from root to node (higher in hierarchy) रूट से नोड तक पथ पर (पदानुक्रम में उच्चतर)
Children बच्चे
Lower level nodes निचले स्तर के नोड्स
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Ancestors: all nodes on path from root to the given node.
व्याख्या (हिन्दी) पूर्वज: रूट से दिए गए नोड तक पथ पर सभी नोड्स।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 219

EN + हिं Medium
GB Internal node is?
IN आंतरिक नोड है?
Node with no parent बिना माता-पिता वाला नोड
Node with at least one child कम से कम एक बच्चे वाला नोड
Deepest level सबसे गहरा स्तर
Leftmost node सबसे बायां नोड
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Internal nodes have at least one child (non-leaf nodes).
व्याख्या (हिन्दी) आंतरिक नोड्स में कम से कम एक बच्चा (गैर-पत्ती नोड्स) होता है।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 220

EN + हिं Easy
GB What is a forest?
IN जंगल क्या है?
A set of trees पेड़ों का एक समूह
Linked list of trees पेड़ों की लिंक्ड सूची
Tree with many leaves अनेक पत्तों वाला वृक्ष
Graph without edges किनारों के बिना ग्राफ़
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) A forest is a collection of disjoint trees.
व्याख्या (हिन्दी) वन विच्छेदित वृक्षों का समूह है।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Easy" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 221

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

Question 222

EN + हिं
GB In Python BST, the Node class attributes are?
IN पायथन बीएसटी में, नोड वर्ग विशेषताएँ हैं?
data, left, right, parent डेटा, बाएँ, दाएँ, अभिभावक
value, previous, next मूल्य, पिछला, अगला
key, data, child कुंजी, डेटा, बच्चा
info, link, level जानकारी, लिंक, स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) TreeNode: self.data, self.right, self.left, self.parent.
व्याख्या (हिन्दी) ट्रीनोड: सेल्फ.डेटा, सेल्फ.राइट, सेल्फ.लेफ्ट, सेल्फ.पैरेंट।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 223

EN + हिं Medium
GB A graph is?
IN एक ग्राफ है?
Linear data structure रैखिक डेटा संरचना
Non-linear with vertices and edges शीर्षों और किनारों के साथ गैर-रैखिक
Hierarchical श्रेणीबद्ध
Circular linked list परिपत्र लिंक्ड सूची
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Graph: non-linear DS with vertices (nodes) and edges (connections).
व्याख्या (हिन्दी) ग्राफ़: शीर्षों (नोड्स) और किनारों (कनेक्शन) के साथ गैर-रैखिक डीएस।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 224

EN + हिं Easy
GB What is an undirected graph?
IN अप्रत्यक्ष ग्राफ क्या है?
Edges have direction किनारों की दिशा होती है
Edges have no direction (bidirectional) किनारों की कोई दिशा नहीं है (द्विदिशात्मक)
Only one vertex केवल एक शिखर
Weighted edges भारित किनारे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Undirected graph: edges are bidirectional — A-B means both directions.
व्याख्या (हिन्दी) अप्रत्यक्ष ग्राफ़: किनारे द्विदिश हैं - A-B का अर्थ दोनों दिशाएँ हैं।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 225

EN + हिं Easy
GB What is a directed graph?
IN निर्देशित ग्राफ़ क्या है?
All edges undirected सभी किनारे अप्रत्यक्ष
Edges have direction (one-way) किनारों की दिशा होती है (एकतरफ़ा)
No edges कोई किनारा नहीं
Equal weight edges समान वजन वाले किनारे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Directed graph (digraph): edges have direction shown by arrows.
व्याख्या (हिन्दी) निर्देशित ग्राफ (डिग्राफ): किनारों की दिशा तीरों द्वारा दर्शाई गई है।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।