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 271

EN + हिं Hard
GB Average time complexity for Python dictionary search?
IN पायथन शब्दकोश खोज के लिए औसत समय जटिलता?
O(n) पर)
O(log n) ओ(लॉग एन)
O(1) हे(1)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Dictionary uses hashing — O(1) average for search/insert/delete.
व्याख्या (हिन्दी) शब्दकोश खोज/डालने/हटाने के लिए हैशिंग - O(1) औसत का उपयोग करता है।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Hard" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 272

EN + हिं Easy
GB What is recursion?
IN प्रत्यावर्तन क्या है?
Loop running forever लूप हमेशा के लिए चल रहा है
Function calling itself फ़ंक्शन स्वयं को कॉल कर रहा है
Iterative algorithm पुनरावृत्त एल्गोरिथ्म
Sorting type छँटाई का प्रकार
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Recursion: function calls itself (directly or indirectly) with base case.
व्याख्या (हिन्दी) रिकर्सन: फ़ंक्शन बेस केस के साथ स्वयं को (प्रत्यक्ष या अप्रत्यक्ष रूप से) कॉल करता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Easy"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 273

EN + हिं Easy
GB What is the base case in recursion?
IN रिकर्सन में आधार मामला क्या है?
Recursive call पुनरावर्ती कॉल
Condition that stops recursion ऐसी स्थिति जो प्रत्यावर्तन को रोक देती है
Initial data structure प्रारंभिक डेटा संरचना
First function call पहला फ़ंक्शन कॉल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Base case terminates recursion. Without it, infinite recursion.
व्याख्या (हिन्दी) बेस केस रिकर्सन को समाप्त करता है। इसके बिना, अनंत प्रत्यावर्तन.
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Easy"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 274

EN + हिं Hard
GB Time complexity of factorial(n) using recursion?
IN रिकर्सन का उपयोग करके फैक्टोरियल (एन) की समय जटिलता?
O(1) हे(1)
O(log n) ओ(लॉग एन)
O(n) पर)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) factorial(n) makes n recursive calls — O(n).
व्याख्या (हिन्दी) फ़ैक्टोरियल(n) n पुनरावर्ती कॉल करता है - O(n)।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Hard" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 275

EN + हिं Medium
GB Python default maximum recursion depth?
IN पायथन डिफ़ॉल्ट अधिकतम रिकर्सन गहराई?
100 100
500 500
1000 1000
10000 10000
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Python recursion limit = 1000 (sys.getrecursionlimit()).
व्याख्या (हिन्दी) पायथन रिकर्सन सीमा = 1000 (sys.getrecursionlimit())।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 276

EN + हिं Hard
GB Memoization in recursion?
IN प्रत्यावर्तन में संस्मरण?
Storing arguments तर्क संग्रहीत करना
Caching results to avoid recomputation पुनर्गणना से बचने के लिए कैशिंग परिणाम
Limiting depth सीमित गहराई
Converting to iteration पुनरावृत्ति में परिवर्तित करना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Memoization: cache expensive function call results (top-down DP).
व्याख्या (हिन्दी) संस्मरण: कैश महँगे फ़ंक्शन कॉल परिणाम (ऊपर से नीचे डीपी)।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Hard"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 277

EN + हिं Medium
GB Tail recursion?
IN पूँछ प्रत्यावर्तन?
Recursion at function start फ़ंक्शन प्रारंभ पर पुनरावर्तन
Recursive call is last operation पुनरावर्ती कॉल अंतिम ऑपरेशन है
Multiple base cases एकाधिक आधार मामले
Two functions दो कार्य
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Tail recursion: recursive call is the last operation in function.
व्याख्या (हिन्दी) टेल रिकर्सन: रिकर्सिव कॉल फ़ंक्शन में अंतिम ऑपरेशन है।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 278

EN + हिं Hard
GB Space complexity of recursive algorithm depth n?
IN पुनरावर्ती एल्गोरिथ्म गहराई n की अंतरिक्ष जटिलता?
O(1) हे(1)
O(n) due to call stack O(n) कॉल स्टैक के कारण
O(log n) ओ(लॉग एन)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Recursion: O(n) space for call stack frames.
व्याख्या (हिन्दी) रिकर्सन: कॉल स्टैक फ़्रेम के लिए O(n) स्थान।
🎯 Exam Perspective
SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Hard"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 279

EN + हिं Hard
GB What is dynamic programming?
IN डायनेमिक प्रोग्रामिंग क्या है?
Programming paradigm प्रोग्रामिंग प्रतिमान
Optimization: solve overlapping subproblems, cache results अनुकूलन: ओवरलैपिंग उपसमस्याओं, कैश परिणामों को हल करें
Sorting type छँटाई का प्रकार
Graph traversal ग्राफ ट्रैवर्सल
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) DP: breaks problems into overlapping subproblems, caches results.
व्याख्या (हिन्दी) डीपी: समस्याओं को ओवरलैपिंग उपसमस्याओं में तोड़ता है, परिणामों को कैश करता है।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Hard"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 280

EN + हिं Medium
GB DP approaches?
IN डीपी दृष्टिकोण?
Recursion and Iteration प्रत्यावर्तन और पुनरावृत्ति
Memoization (top-down) and Tabulation (bottom-up) संस्मरण (ऊपर से नीचे) और सारणीकरण (नीचे से ऊपर)
Greedy and Divide-Conquer लालची और फूट डालो-जीतो
BFS and DFS बीएफएस और डीएफएस
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) DP uses Memoization (top-down) or Tabulation (bottom-up).
व्याख्या (हिन्दी) DP मेमोइज़ेशन (ऊपर से नीचे) या सारणीकरण (नीचे से ऊपर) का उपयोग करता है।
🎯 Exam Perspective
Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 281

EN + हिं Hard
GB Naive recursive Fibonacci time complexity?
IN अनुभवहीन पुनरावर्ती फाइबोनैचि समय जटिलता?
O(n) पर)
O(log n) ओ(लॉग एन)
O(2^n) exponential O(2^n) घातीय
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Naive Fibonacci: O(2^n) — redundant recomputation of subproblems.
व्याख्या (हिन्दी) अनुभवहीन फाइबोनैचि: O(2^n) - उपसमस्याओं की निरर्थक पुनर्गणना।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms category का है — difficulty level "Hard", और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 282

EN + हिं Hard
GB Fibonacci with memoization time complexity?
IN संस्मरण समय जटिलता के साथ फाइबोनैचि?
O(2^n) ओ(2^एन)
O(n log n) ओ(एन लॉग एन)
O(n) पर)
O(1) हे(1)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) With memoization: each value computed once — O(n).
व्याख्या (हिन्दी) संस्मरण के साथ: प्रत्येक मान की गणना एक बार की जाती है - O(n)।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Hard"। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 283

EN + हिं Medium
GB Tower of Hanoi with n disks requires how many moves?
IN एन डिस्क वाले हनोई के टॉवर को कितनी चालों की आवश्यकता है?
n² n²
n! एन!
2^n - 1 2^एन - 1
n log n एन लॉग एन
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Tower of Hanoi: T(n)=2T(n-1)+1 = 2^n-1 moves.
व्याख्या (हिन्दी) हनोई की मीनार: T(n)=2T(n-1)+1 = 2^n-1 चलती है।
🎯 Exam Perspective
Data Structures and Algorithms से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 284

EN + हिं Medium
GB sys.setrecursionlimit() is used to?
IN sys.setrecursionlimit() का प्रयोग किसके लिए किया जाता है?
Set max array size अधिकतम सरणी आकार सेट करें
Set maximum recursion depth अधिकतम प्रत्यावर्तन गहराई निर्धारित करें
Set timeout टाइमआउट सेट करें
Enable tail recursion पूँछ पुनरावर्तन सक्षम करें
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) sys.setrecursionlimit(n) sets Python's maximum recursion depth.
व्याख्या (हिन्दी) sys.setrecursionlimit(n) पायथन की अधिकतम रिकर्सन गहराई निर्धारित करता है।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 285

EN + हिं Hard
GB Time complexity of Python list append()?
IN पायथन सूची की समय जटिलता संलग्न ()?
O(n) पर)
O(log n) ओ(लॉग एन)
O(1) amortized ओ(1) परिशोधन
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) list.append() is O(1) amortized — occasionally triggers O(n) doubling.
व्याख्या (हिन्दी) list.append() O(1) परिशोधित है - कभी-कभी O(n) दोहरीकरण को ट्रिगर करता है।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Hard"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।