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

Question 121

EN + हिं Medium
GB Topological sort applies to?
IN टोपोलॉजिकल सॉर्ट किस पर लागू होता है?
Undirected graphs अप्रत्यक्ष रेखांकन
DAG (Directed Acyclic Graphs) डीएजी (निर्देशित एसाइक्लिक ग्राफ़)
Weighted graphs भारित ग्राफ़
Complete graphs पूर्ण ग्राफ़
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Topological sort only for DAGs.
व्याख्या (हिन्दी) केवल डीएजी के लिए टोपोलॉजिकल सॉर्ट।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 122

EN + हिं Medium
GB Kruskal's or Prim's algorithm finds?
IN क्रुस्कल या प्राइम का एल्गोरिदम ढूँढता है?
BFS tree बीएफएस पेड़
DFS tree डीएफएस पेड़
Minimum Spanning Tree न्यूनतम फैलाव वाला पेड़
Shortest path सबसे छोटा रास्ता
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Kruskal's and Prim's find the Minimum Spanning Tree (MST).
व्याख्या (हिन्दी) क्रुस्कल और प्राइम मिनिमम स्पैनिंग ट्री (एमएसटी) ढूंढते हैं।
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 123

EN + हिं Medium
GB MST with n vertices has how many edges?
IN n शीर्षों वाले MST में कितने किनारे होते हैं?
n एन
n-1 एन-1
n+1 एन+1
n(n-1)/2 n(n-1)/2
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) MST always has exactly n-1 edges.
व्याख्या (हिन्दी) MST में हमेशा बिल्कुल n-1 किनारे होते हैं।
🎯 Exam Perspective
अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 124

EN + हिं Medium
GB Bipartite graph?
IN द्विदलीय ग्राफ?
Divided into two sets, edges only between sets दो सेटों में विभाजित, केवल सेटों के बीच किनारे
Exactly two components बिल्कुल दो घटक
Complete with even vertices सम शीर्षों से पूर्ण
Only two edges केवल दो किनारे
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Bipartite: two independent sets U and V, edges only between U and V.
व्याख्या (हिन्दी) द्विदलीय: दो स्वतंत्र सेट यू और वी, किनारे केवल यू और वी के बीच।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 125

EN + हिं Medium
GB Euler path in graph?
IN ग्राफ़ में यूलर पथ?
Visits every vertex once प्रत्येक शीर्ष पर एक बार जाएँ
Traverses every edge exactly once प्रत्येक किनारे को ठीक एक बार पार करता है
Shortest path सबसे छोटा रास्ता
Cycle through all vertices सभी शीर्षों से होकर गुजरें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Euler path visits every edge exactly once.
व्याख्या (हिन्दी) यूलर पथ प्रत्येक किनारे पर ठीक एक बार जाता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Medium", और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 126

EN + हिं Medium
GB Hamiltonian path?
IN हैमिल्टनियन पथ?
Every edge once हर किनारा एक बार
Every vertex exactly once प्रत्येक शिखर बिल्कुल एक बार
Longest path सबसे लंबा रास्ता
Minimum weight path न्यूनतम वजन पथ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Hamiltonian path visits every vertex exactly once (NP-complete).
व्याख्या (हिन्दी) हैमिल्टनियन पथ प्रत्येक शीर्ष पर ठीक एक बार जाता है (एनपी-पूर्ण)।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 127

EN + हिं Medium
GB Kosaraju's or Tarjan's algorithm finds?
IN कोसाराजू या टारजन का एल्गोरिदम मिलता है?
MST एमएसटी
Shortest path सबसे छोटा रास्ता
Strongly Connected Components मजबूती से जुड़े हुए घटक
Topological order स्थलाकृतिक क्रम
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Both find SCCs in directed graphs in O(V+E) time.
व्याख्या (हिन्दी) दोनों O(V+E) समय में निर्देशित ग्राफ़ में SCCs पाते हैं।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 128

EN + हिं Medium
GB Bellman-Ford handles?
IN बेलमैन-फ़ोर्ड संभालता है?
MST एमएसटी
Single-source shortest path including negative weights नकारात्मक भार सहित एकल-स्रोत सबसे छोटा पथ
Topological sort टोपोलॉजिकल सॉर्ट
Cycle detection only केवल चक्र का पता लगाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Bellman-Ford: single-source shortest path with negative edge weights. O(VE).
व्याख्या (हिन्दी) बेलमैन-फोर्ड: नकारात्मक बढ़त भार के साथ एकल-स्रोत सबसे छोटा पथ। ओ(वीई).
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 129

EN + हिं Medium
GB Floyd-Warshall algorithm?
IN फ्लोयड-वॉर्शल एल्गोरिदम?
Single-source shortest एकल-स्रोत सबसे छोटा
MST एमएसटी
All-pairs shortest path सभी युग्म सबसे छोटा पथ
Cycle detection चक्र का पता लगाना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Floyd-Warshall: all-pairs shortest path in O(V³).
व्याख्या (हिन्दी) फ्लोयड-वॉर्शल: O(V³) में सभी जोड़े का सबसे छोटा पथ।
🎯 Exam Perspective
अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 130

EN + हिं Hard
GB Topological sort time complexity using DFS?
IN डीएफएस का उपयोग कर टोपोलॉजिकल सॉर्ट समय जटिलता?
O(V²) ओ(वी²)
O(V+E) ओ(वी+ई)
O(V log V) ओ(वी लॉग वी)
O(E log V) ओ(ई लॉग वी)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Topological sort = O(V+E) using DFS.
व्याख्या (हिन्दी) टोपोलॉजिकल सॉर्ट = O(V+E) DFS का उपयोग करते हुए।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Hard" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 131

EN + हिं Medium
GB A data structure is?
IN एक डेटा संरचना है?
Programming language feature प्रोग्रामिंग भाषा सुविधा
Way to organize and store data for efficient access कुशल पहुंच के लिए डेटा को व्यवस्थित और संग्रहीत करने का तरीका
Database management डेटाबेस प्रबंधन
Sorting algorithm छँटाई एल्गोरिथ्म
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) DS: way to organize, manage, store data for efficient access/modification.
व्याख्या (हिन्दी) डीएस: कुशल पहुंच/संशोधन के लिए डेटा को व्यवस्थित, प्रबंधित, संग्रहीत करने का तरीका।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Medium", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 132

EN + हिं Medium
GB Linear data structure example?
IN रैखिक डेटा संरचना उदाहरण?
Tree पेड़
Graph ग्राफ़
Stack ढेर
Heap ढेर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Stack is linear; Trees and Graphs are non-linear.
व्याख्या (हिन्दी) स्टैक रैखिक है; पेड़ और ग्राफ़ अरैखिक हैं।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 133

EN + हिं Medium
GB Non-linear data structure example?
IN गैर-रेखीय डेटा संरचना उदाहरण?
Array सरणी
Linked List लिंक्ड सूची
Queue कतार
Graph ग्राफ़
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Graph is non-linear — elements can connect to more than two others.
व्याख्या (हिन्दी) ग्राफ़ गैर-रैखिक है - तत्व दो से अधिक अन्य से जुड़ सकते हैं।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 134

EN + हिं Medium
GB Linear DS elements are stored?
IN रैखिक डीएस तत्व संग्रहीत हैं?
Hierarchically पदानुक्रम
Randomly बेतरतीब
Sequentially, connected to prev and next क्रमिक रूप से, पिछला और अगला से जुड़ा हुआ
Separate memory blocks अलग मेमोरी ब्लॉक
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Linear DS: elements stored sequentially with prev/next connections.
व्याख्या (हिन्दी) रैखिक डीएस: तत्वों को पिछले/अगले कनेक्शन के साथ क्रमिक रूप से संग्रहीत किया जाता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 135

EN + हिं Medium
GB In non-linear DS, element can connect to?
IN नॉन-लीनियर डीएस में, तत्व किससे जुड़ सकता है?
Exactly two बिल्कुल दो
Only one केवल एक
More than two दो से अधिक
No elements कोई तत्व नहीं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Non-linear DS: elements can connect to more than two others.
व्याख्या (हिन्दी) गैर-रेखीय डीएस: तत्व दो से अधिक अन्य से जुड़ सकते हैं।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।