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
166
EN + हिं Medium
GB Stack and Queue can be implemented using?
IN स्टैक और क्यू का उपयोग करके कार्यान्वित किया जा सकता है?
A
Arrays only केवल सारणी
B
Linked lists only केवल लिंक की गई सूचियाँ
C
Both arrays and linked lists सरणियाँ और लिंक्ड सूचियाँ दोनों
D
Trees only केवल पेड़
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Both Stack and Queue can use arrays or linked lists.
व्याख्या (हिन्दी) स्टैक और क्यू दोनों ही सरणियों या लिंक्ड सूचियों का उपयोग कर सकते हैं।
167
EN + हिं Medium
GB One pair of linked list item + reference = ?
IN लिंक्ड सूची आइटम की एक जोड़ी + संदर्भ = ?
A
Edge किनारा
B
Vertex शिखर
C
Node नोड
D
Bucket बाल्टी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) One item and its reference to next item constitutes a node.
व्याख्या (हिन्दी) एक आइटम और उसके अगले आइटम का संदर्भ एक नोड का गठन करता है।
168
EN + हिं Medium
GB Linked list doesn't require:
IN लिंक की गई सूची की आवश्यकता नहीं है:
A
Traversal traversal
B
Sequential element access अनुक्रमिक तत्व पहुंच
C
Contiguous memory allocation सन्निहित स्मृति आवंटन
D
Pointers संकेत
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Linked lists don't need contiguous memory — nodes can be anywhere.
व्याख्या (हिन्दी) लिंक की गई सूचियों को सन्निहित मेमोरी की आवश्यकता नहीं है - नोड्स कहीं भी हो सकते हैं।
169
EN + हिं Medium
GB Floyd's cycle detection uses?
IN फ्लोयड के चक्र का पता लगाने का उपयोग करता है?
A
Two queues दो कतारें
B
Binary search द्विआधारी खोज
C
Slow and fast pointer धीमा और तेज़ सूचक
D
Stack ढेर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Floyd's: slow moves 1 step, fast moves 2. If they meet = cycle.
व्याख्या (हिन्दी) फ्लोयड: धीमी चाल 1 कदम, तेज़ चाल 2। यदि वे मिलते हैं = साइकिल।
170
EN + हिं Hard
GB Linked list search time complexity?
IN लिंक्ड सूची खोज समय जटिलता?
A
O(1) हे(1)
B
O(log n) ओ(लॉग एन)
C
O(n) पर)
D
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Search in linked list requires O(n) traversal.
व्याख्या (हिन्दी) लिंक की गई सूची में खोजने के लिए O(n) ट्रैवर्सल की आवश्यकता होती है।
171
EN + हिं Medium
GB In circular LL with 4 nodes A,B,C,D starting at A, node after 5 steps?
IN वृत्ताकार एलएल में 4 नोड्स ए, बी, सी, डी के साथ ए से शुरू होकर, 5 चरणों के बाद नोड?
A
A
B
B बी
C
C सी
D
D डी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) A(0)→B(1)→C(2)→D(3)→A(4)→B(5). B after 5 steps.
व्याख्या (हिन्दी) A(0)→B(1)→C(2)→D(3)→A(4)→B(5). 5 चरणों के बाद बी.
172
EN + हिं Medium
GB Topmost node of a tree?
IN पेड़ का सबसे ऊपरी नोड?
A
Child बच्चा
B
Leaf पत्ता
C
Root जड़
D
Sibling भाई बहन
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Root is the topmost node with no parent.
व्याख्या (हिन्दी) रूट सबसे ऊपरी नोड है जिसका कोई पेरेंट नहीं है।
173
EN + हिं Medium
GB Nodes with no children are called?
IN बिना संतान वाले नोड्स को क्या कहा जाता है?
A
Root nodes रूट नोड्स
B
Internal nodes आंतरिक नोड्स
C
Parent nodes मूल नोड्स
D
Leaf nodes पत्ती की गांठे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Leaf nodes (external nodes) have no children.
व्याख्या (हिन्दी) लीफ नोड्स (बाहरी नोड्स) की कोई संतान नहीं है।
174
EN + हिं Medium
GB Degree of a node?
IN एक नोड की डिग्री?
A
Depth of node नोड की गहराई
B
Edges connected किनारे जुड़े हुए हैं
C
Maximum number of children बच्चों की अधिकतम संख्या
D
Level स्तर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Node degree = maximum number of children a node has.
व्याख्या (हिन्दी) नोड डिग्री = एक नोड में बच्चों की अधिकतम संख्या।
175
EN + हिं Medium
GB Level of root node?
IN रूट नोड का स्तर?
A
1 1
B
-1 -1
D
Undefined अपरिभाषित
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Root is at level 0; its children at level 1, etc.
व्याख्या (हिन्दी) रूट 0 स्तर पर है; इसके बच्चे स्तर 1 आदि पर हैं।
176
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 बच्चे होते हैं।
177
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 बच्चे होते हैं।
178
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.
व्याख्या (हिन्दी) पूरा बाइनरी ट्री: ऊपर से नीचे, बाएँ से दाएँ भरा हुआ।
179
EN + हिं Medium
GB Left child of node i in array representation?
IN सरणी प्रतिनिधित्व में नोड I का बायां बच्चा?
A
i-1 मैं -1
B
i+1 मैं+1
C
2i 2i
D
i/2 मैं/2
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Left child of node i = 2i.
व्याख्या (हिन्दी) नोड i = 2i का बायाँ बच्चा।
180
EN + हिं Medium
GB Right child of node i in array representation?
IN सरणी प्रतिनिधित्व में नोड i का सही बच्चा?
A
2i 2i
B
2i+1 2i+1
C
2i-1 2i-1
D
i+1 मैं+1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Right child of node i = 2i+1.
व्याख्या (हिन्दी) नोड i का दायां बच्चा = 2i+1.
166–180 of 1018