Data Structures and Algorithms — MCQ Practice

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

📚 819 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
819 questions
91
EN + हिं Medium
GB LR rotation is combination of?
IN एलआर रोटेशन किसका संयोजन है?
A
Two right rotations दो सही घुमाव
B
Two left rotations दो बाएँ घुमाव
C
Single left then single right rotation एक बाएँ और फिर एक दाएँ घुमाव
D
Single right then single left एक दाएँ फिर एक बाएँ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) LR = single left rotation followed by single right rotation.
व्याख्या (हिन्दी) एलआर = एकल बाएँ घुमाव के बाद एकल दाएँ घुमाव।
92
EN + हिं Medium
GB RL rotation is combination of?
IN आरएल रोटेशन किसका संयोजन है?
A
Left then right rotation बाएँ फिर दाएँ घुमाव
B
Single right then single left rotation एक दाएँ फिर एक बाएँ घुमाव
C
Two right rotations दो सही घुमाव
D
Two left rotations दो बाएँ घुमाव
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) RL = single right rotation followed by single left rotation.
व्याख्या (हिन्दी) आरएल = एकल दाएं घुमाव के बाद एकल बाएं घुमाव।
93
EN + हिं Hard
GB B+ tree leaf nodes are connected as?
IN B+ ट्री लीफ नोड्स किस प्रकार जुड़े हुए हैं?
A
To root जड़ देना
B
Linked list of leaves पत्तों की लिंक्ड सूची
C
Randomly बेतरतीब
D
Nothing कुछ नहीं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) B+ tree leaves are linked — enables efficient range queries.
व्याख्या (हिन्दी) बी+ पेड़ की पत्तियां जुड़ी हुई हैं - कुशल श्रेणी के प्रश्नों को सक्षम बनाती हैं।
94
EN + हिं Medium
GB Tree degree?
IN वृक्ष की डिग्री?
A
Height ऊंचाई
B
Number of leaves पत्तों की संख्या
C
Maximum of all node degrees सभी नोड डिग्री में से अधिकतम
D
Number of edges किनारों की संख्या
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Tree degree = maximum degree among all nodes.
व्याख्या (हिन्दी) ट्री डिग्री = सभी नोड्स के बीच अधिकतम डिग्री।
95
EN + हिं Medium
GB Which traversal used for tree deletion (delete children before parent)?
IN पेड़ हटाने (पैरेंट से पहले बच्चों को हटाएं) के लिए किस ट्रैवर्सल का उपयोग किया जाता है?
A
Preorder पूर्व आदेश
B
Inorder क्रम में
C
Postorder पोस्ट ऑर्डर
D
Level-order स्तर से आदेश
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Postorder (L-R-Root) used for deletion — children deleted before parent.
व्याख्या (हिन्दी) हटाने के लिए पोस्टऑर्डर (एल-आर-रूट) का उपयोग किया जाता है - बच्चों को माता-पिता से पहले हटा दिया जाता है।
96
EN + हिं Easy
GB What is a degenerate BST?
IN पतित BST क्या है?
A
Balanced BST संतुलित बीएसटी
B
All nodes have one child (skewed like linked list) सभी नोड्स में एक बच्चा होता है (लिंक्ड सूची की तरह तिरछा)
C
No leaves कोई पत्तियां नहीं
D
Complete binary tree पूरा बाइनरी ट्री
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Degenerate BST: all nodes on one side — degenerates to linked list.
व्याख्या (हिन्दी) डिजेनरेट बीएसटी: सभी नोड्स एक तरफ - लिंक की गई सूची में डिजेनरेट हो जाते हैं।
97
EN + हिं Medium
GB In BST, all operations on balanced tree?
IN बीएसटी में, संतुलित वृक्ष पर सभी परिचालन?
A
O(n) पर)
B
O(log n) ओ(लॉग एन)
C
O(1) हे(1)
D
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) All BST operations (search/insert/delete) on balanced tree = O(log n).
व्याख्या (हिन्दी) संतुलित ट्री पर सभी बीएसटी ऑपरेशन (खोज/डालें/हटाएं) = ओ(लॉग एन)।
98
EN + हिं Medium
GB Siblings in tree are nodes that?
IN पेड़ में भाई-बहन नोड हैं कि?
A
Have no children कोई संतान नहीं है
B
Share same parent समान अभिभावक साझा करें
C
Same height वही ऊंचाई
D
Connected by edge किनारे से जुड़ा हुआ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Siblings share the same parent node.
व्याख्या (हिन्दी) भाई-बहन एक ही मूल नोड साझा करते हैं।
99
EN + हिं Medium
GB Ancestors of a node are?
IN एक नोड के पूर्वज हैं?
A
Same level nodes समान स्तर के नोड्स
B
On path from root to node (higher in hierarchy) रूट से नोड तक पथ पर (पदानुक्रम में उच्चतर)
C
Children बच्चे
D
Lower level nodes निचले स्तर के नोड्स
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Ancestors: all nodes on path from root to the given node.
व्याख्या (हिन्दी) पूर्वज: रूट से दिए गए नोड तक पथ पर सभी नोड्स।
100
EN + हिं Medium
GB Internal node is?
IN आंतरिक नोड है?
A
Node with no parent बिना माता-पिता वाला नोड
B
Node with at least one child कम से कम एक बच्चे वाला नोड
C
Deepest level सबसे गहरा स्तर
D
Leftmost node सबसे बायां नोड
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Internal nodes have at least one child (non-leaf nodes).
व्याख्या (हिन्दी) आंतरिक नोड्स में कम से कम एक बच्चा (गैर-पत्ती नोड्स) होता है।
101
EN + हिं Easy
GB What is a forest?
IN जंगल क्या है?
A
A set of trees पेड़ों का एक समूह
B
Linked list of trees पेड़ों की लिंक्ड सूची
C
Tree with many leaves अनेक पत्तों वाला वृक्ष
D
Graph without edges किनारों के बिना ग्राफ़
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) A forest is a collection of disjoint trees.
व्याख्या (हिन्दी) वन विच्छेदित वृक्षों का समूह है।
102
EN + हिं
GB In Python BST, the Node class attributes are?
IN पायथन बीएसटी में, नोड वर्ग विशेषताएँ हैं?
A
data, left, right, parent डेटा, बाएँ, दाएँ, अभिभावक
B
value, previous, next मूल्य, पिछला, अगला
C
key, data, child कुंजी, डेटा, बच्चा
D
info, link, level जानकारी, लिंक, स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) TreeNode: self.data, self.right, self.left, self.parent.
व्याख्या (हिन्दी) ट्रीनोड: सेल्फ.डेटा, सेल्फ.राइट, सेल्फ.लेफ्ट, सेल्फ.पैरेंट।
103
EN + हिं Easy
GB What is an undirected graph?
IN अप्रत्यक्ष ग्राफ क्या है?
A
Edges have direction किनारों की दिशा होती है
B
Edges have no direction (bidirectional) किनारों की कोई दिशा नहीं है (द्विदिशात्मक)
C
Only one vertex केवल एक शिखर
D
Weighted edges भारित किनारे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Undirected graph: edges are bidirectional — A-B means both directions.
व्याख्या (हिन्दी) अप्रत्यक्ष ग्राफ़: किनारे द्विदिश हैं - A-B का अर्थ दोनों दिशाएँ हैं।
104
EN + हिं Easy
GB What is a directed graph?
IN निर्देशित ग्राफ़ क्या है?
A
All edges undirected सभी किनारे अप्रत्यक्ष
B
Edges have direction (one-way) किनारों की दिशा होती है (एकतरफ़ा)
C
No edges कोई किनारा नहीं
D
Equal weight edges समान वजन वाले किनारे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Directed graph (digraph): edges have direction shown by arrows.
व्याख्या (हिन्दी) निर्देशित ग्राफ (डिग्राफ): किनारों की दिशा तीरों द्वारा दर्शाई गई है।
105
EN + हिं Easy
GB What is a null graph?
IN शून्य ग्राफ़ क्या है?
A
No vertices कोई शीर्ष नहीं
B
No edges कोई किनारा नहीं
C
Disconnected vertices विच्छेदित शीर्ष
D
Null values only केवल शून्य मान
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Null graph has no edges — only vertices exist.
व्याख्या (हिन्दी) शून्य ग्राफ़ का कोई किनारा नहीं है - केवल शीर्ष मौजूद हैं।
91–105 of 819