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 31

EN + हिं Medium
GB What prerequisite does binary search require?
IN बाइनरी खोज के लिए किस शर्त की आवश्यकता है?
Unsorted list अवर्गीकृत सूची
Sorted list क्रमबद्ध सूची
Unique elements अद्वितीय तत्व
Circular list परिपत्र सूची
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Binary search requires a sorted list.
व्याख्या (हिन्दी) बाइनरी खोज के लिए एक क्रमबद्ध सूची की आवश्यकता होती है।
🎯 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 32

EN + हिं Medium
GB Binary search uses which algorithm technique?
IN बाइनरी खोज किस एल्गोरिथम तकनीक का उपयोग करती है?
Greedy लालची
Dynamic programming गतिशील प्रोग्रामिंग
Divide and conquer फूट डालो और राज करो
Backtracking बैक ट्रैकिंग
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Binary search uses divide and conquer — halves search space each step.
व्याख्या (हिन्दी) बाइनरी खोज विभाजित करें और जीतें का उपयोग करती है - प्रत्येक चरण में आधे स्थान खोजते हैं।
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 33

EN + हिं Medium
GB How is middle element calculated in binary search?
IN बाइनरी खोज में मध्य तत्व की गणना कैसे की जाती है?
mid=(low-high)/2 मध्य=(निम्न-उच्च)/2
mid=(low+high)//2 मध्य=(निम्न+उच्च)//2
mid=low+high मध्य=निम्न+उच्च
mid=high-low मध्य = ऊँचा-नीचा
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) mid=(low+high)//2 gives integer middle index.
व्याख्या (हिन्दी) मध्य=(निम्न+उच्च)//2 पूर्णांक मध्य सूचकांक देता है।
🎯 Exam Perspective
अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 34

EN + हिं Medium
GB If search element > middle element, which half is searched?
IN यदि खोज तत्व > मध्य तत्व, तो कौन सा आधा खोजा गया है?
Left half आधा बायां
Both halves दोनों हिस्से
Right half दाहिना आधा
Random half यादृच्छिक आधा
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) If key > mid, search right half: low = mid+1.
व्याख्या (हिन्दी) यदि कुंजी > मध्य है, तो दायां आधा खोजें: निम्न = मध्य+1।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 35

EN + हिं Hard
GB Time complexity of binary search?
IN बाइनरी खोज की समय जटिलता?
O(n) पर)
O(n²) ओ(एन²)
O(log n) ओ(लॉग एन)
O(n log n) ओ(एन लॉग एन)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Binary search is O(log n) — halves search space each step.
व्याख्या (हिन्दी) बाइनरी खोज O (लॉग एन) है - प्रत्येक चरण में खोज स्थान को आधा कर देता है।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है — difficulty level "Hard", और UPSC, SSC, Banking और Police भर्ती के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 36

EN + हिं Hard
GB How many comparisons does binary search make for 1024 elements (worst case)?
IN बाइनरी खोज 1024 तत्वों (सबसे खराब स्थिति) के लिए कितनी तुलनाएँ करती है?
100 100
10 10
512 512
1024 1024
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) log₂(1024)=10 comparisons worst case.
व्याख्या (हिन्दी) log₂(1024)=10 तुलना सबसे खराब स्थिति।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Hard"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 37

EN + हिं Medium
GB Binary search cannot be applied efficiently to which data structure?
IN बाइनरी खोज को किस डेटा संरचना में कुशलतापूर्वक लागू नहीं किया जा सकता है?
Sorted array क्रमबद्ध सरणी
Sorted linked list क्रमबद्ध लिंक्ड सूची
Balanced BST संतुलित बीएसटी
Sorted strings क्रमबद्ध तार
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) No direct index access in linked list — O(n) to find mid.
व्याख्या (हिन्दी) लिंक की गई सूची में कोई सीधी अनुक्रमणिका पहुंच नहीं - मध्य खोजने के लिए O(n)।
🎯 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 38

EN + हिं Medium
GB Which search uses position estimation based on value distribution?
IN कौन सी खोज मूल्य वितरण के आधार पर स्थिति अनुमान का उपयोग करती है?
Linear search रेखीय खोज
Binary search द्विआधारी खोज
Interpolation search अंतर्वेशन खोज
Jump search खोज कूदो
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Interpolation search estimates position using value distribution.
व्याख्या (हिन्दी) इंटरपोलेशन खोज मूल्य वितरण का उपयोग करके स्थिति का अनुमान लगाती है।
🎯 Exam Perspective
SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 39

EN + हिं Hard
GB Which search has O(log log n) average time complexity?
IN किस खोज में O(लॉग लॉग एन) औसत समय जटिलता है?
Linear रेखीय
Binary द्विआधारी
Interpolation प्रक्षेप
Jump कूदना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Interpolation search has O(log log n) for uniformly distributed data.
व्याख्या (हिन्दी) समान रूप से वितरित डेटा के लिए इंटरपोलेशन सर्च में O (लॉग लॉग एन) है।
🎯 Exam Perspective
अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Hard"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 40

EN + हिं Medium
GB In binary search, when element == middle element:
IN बाइनरी खोज में, जब तत्व == मध्य तत्व:
Search right सही खोजें
Search left बाईं ओर खोजें
Element found, return index तत्व मिला, वापसी सूचकांक
Restart पुनः आरंभ करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) When list[mid]==key, the element is found — return mid.
व्याख्या (हिन्दी) जब सूची[मध्य]==कुंजी, तत्व मिल जाता है - मध्य लौटें।
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 41

EN + हिं Medium
GB Loop condition in iterative binary search:
IN पुनरावृत्तीय बाइनरी खोज में लूप स्थिति:
while low < high जबकि निम्न <उच्च
while low <= high जबकि कम
while low != high जबकि निम्न != उच्च
while low >= high जबकि निम्न >= उच्च
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) while low<=high — exits when low>high (not found).
व्याख्या (हिन्दी) जबकि लोहाई (नहीं मिला)।
🎯 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 42

EN + हिं Easy
GB What is ternary search?
IN टर्नरी खोज क्या है?
Divides into 2 parts 2 भागों में विभाजित करता है
Divides into 3 parts 3 भागों में विभाजित करता है
Uses hash table हैश तालिका का उपयोग करता है
Sequential scan अनुक्रमिक स्कैन
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Ternary search divides array into 3 parts using two midpoints.
व्याख्या (हिन्दी) टर्नरी खोज दो मध्यबिंदुओं का उपयोग करके सरणी को 3 भागों में विभाजित करती है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Easy"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 43

EN + हिं Medium
GB question
IN सवाल
option_a विकल्प_ए
option_b विकल्प_बी
option_c विकल्प_सी
option_d विकल्प_डी
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) solution
व्याख्या (हिन्दी) समाधान
🎯 Exam Perspective
Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 44

EN + हिं Hard
GB Which has same O(n log n) in best, average, worst case?
IN सर्वोत्तम, औसत, सबसे खराब स्थिति में किसका O(n log n) समान है?
Bubble बुलबुला
Quick जल्दी
Merge मर्ज
Insertion प्रविष्टि
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Merge sort consistently achieves O(n log n) in all cases.
व्याख्या (हिन्दी) मर्ज सॉर्ट सभी मामलों में लगातार O(n log n) प्राप्त करता है।
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Hard"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 45

EN + हिं Easy
GB What does 'stable sorting' mean?
IN 'स्थिर छँटाई' का क्या अर्थ है?
Resistant to overflow अतिप्रवाह के प्रति प्रतिरोधी
Equal elements keep original relative order समान तत्व मूल सापेक्ष क्रम बनाए रखते हैं
Always same time हमेशा एक ही समय
Never crashes कभी क्रैश नहीं होता
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Stable sort: equal elements maintain their original relative order.
व्याख्या (हिन्दी) स्थिर प्रकार: समान तत्व अपने मूल सापेक्ष क्रम को बनाए रखते हैं।
🎯 Exam Perspective
अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।