Data Structures and Algorithms — MCQ Practice

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

📚 16 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
16 questions

Question 1

EN + हिं Medium
GB Left child of node i in array representation?
IN सरणी प्रतिनिधित्व में नोड I का बायां बच्चा?
i-1 मैं -1
i+1 मैं+1
2i 2i
i/2 मैं/2
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Left child of node i = 2i.
व्याख्या (हिन्दी) नोड i = 2i का बायाँ बच्चा।
🎯 Exam Perspective
Data Structures and Algorithms ("Arrays" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 2

EN + हिं Medium
GB Right child of node i in array representation?
IN सरणी प्रतिनिधित्व में नोड i का सही बच्चा?
2i 2i
2i+1 2i+1
2i-1 2i-1
i+1 मैं+1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Right child of node i = 2i+1.
व्याख्या (हिन्दी) नोड i का दायां बच्चा = 2i+1.
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Arrays" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 3

EN + हिं Medium
GB Parent of node i in array representation?
IN सरणी प्रतिनिधित्व में नोड I का जनक?
2i 2i
i+1 मैं+1
floor(i/2) मंजिल(i/2)
i-1 मैं -1
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Parent of node i = floor(i/2).
व्याख्या (हिन्दी) नोड का जनक i = मंजिल(i/2)।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Arrays" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 4

EN + हिं Medium
GB 2D array graph representation?
IN 2डी सरणी ग्राफ प्रतिनिधित्व?
Adjacency list निकटवर्ती सूची
Adjacency matrix सहखंडज मैट्रिक्स
Edge list किनारे की सूची
Incidence matrix घटना मैट्रिक्स
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Adjacency matrix: V×V 2D array; matrix[i][j]=1 if edge exists.
व्याख्या (हिन्दी) निकटवर्ती मैट्रिक्स: V×V 2D सरणी; मैट्रिक्स[i][j]=1 यदि किनारा मौजूद है।
🎯 Exam Perspective
Data Structures and Algorithms ("Arrays" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 5

EN + हिं Medium
GB Array is?
IN ऐरे है?
Collection of nodes with pointers पॉइंटर्स के साथ नोड्स का संग्रह
Elements of same type at contiguous memory locations सन्निहित स्मृति स्थानों पर एक ही प्रकार के तत्व
Key-value pairs कुंजी-मूल्य जोड़े
Hierarchical structure पदानुक्रमित संरचना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Array: same data type elements at contiguous memory locations.
व्याख्या (हिन्दी) सारणी: सन्निहित स्मृति स्थानों पर समान डेटा प्रकार के तत्व।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Arrays" sub-topic) category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 6

EN + हिं Medium
GB Insertion at beginning of array of n elements?
IN एन तत्वों की सरणी की शुरुआत में सम्मिलन?
O(1) हे(1)
O(log n) ओ(लॉग एन)
O(n) पर)
O(n²) ओ(एन²)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Insert at beginning requires shifting all n elements — O(n).
व्याख्या (हिन्दी) शुरुआत में सम्मिलित करने के लिए सभी n तत्वों - O(n) को स्थानांतरित करने की आवश्यकता होती है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Arrays" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 7

EN + हिं Medium
GB Suffix array is used for:
IN प्रत्यय सरणी का उपयोग इसके लिए किया जाता है:
Sorting suffixes प्रत्ययों को क्रमबद्ध करना
Efficient string operations (search, LCP) by storing sorted suffixes क्रमबद्ध प्रत्ययों को संग्रहीत करके कुशल स्ट्रिंग संचालन (खोज, एलसीपी)।
Prefix operations उपसर्ग संचालन
Hash table हैश तालिका
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Suffix array enables O(m log n) pattern matching.
व्याख्या (हिन्दी) प्रत्यय सरणी O(m log n) पैटर्न मिलान को सक्षम बनाती है।
🎯 Exam Perspective
Data Structures and Algorithms ("Arrays" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 8

EN + हिं Medium
GB The maximum subarray sum problem is solved by:
IN अधिकतम उपसरणी योग समस्या का समाधान निम्न द्वारा किया जाता है:
Brute force O(n^3) क्रूर बल O(n^3)
Kadane algorithm in O(n) O(n) में कडेन एल्गोरिथम
Divide and conquer only केवल बांटो और राज करो
DP always O(n^2) DP हमेशा O(n^2)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Kadane: O(n) max subarray sum.
व्याख्या (हिन्दी) कदाने: O(n) अधिकतम उपसरणी योग।
🎯 Exam Perspective
UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Arrays" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 9

EN + हिं Medium
GB Dutch National Flag problem sorts array of 0s, 1s, 2s in:
IN डच राष्ट्रीय ध्वज समस्या 0s, 1s, 2s की सारणी को क्रमबद्ध करती है:
O(n log n) ओ(एन लॉग एन)
O(n) using three-way partitioning O(n) तीन-तरफ़ा विभाजन का उपयोग करते हुए
O(n^2) ओ(एन^2)
O(1) हे(1)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Three pointers: O(n) single pass.
व्याख्या (हिन्दी) तीन संकेतक: ओ(एन) सिंगल पास।
🎯 Exam Perspective
अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Arrays" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।

Question 10

EN + हिं Medium
GB Binary search on sorted array {1,3,5,7,9,11,13}: how many comparisons to find 7?
IN क्रमबद्ध सरणी पर बाइनरी खोज {1,3,5,7,9,11,13}: 7 खोजने के लिए कितनी तुलनाएँ?
1 1
2 2
3 3
4 4
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) mid=7 at index 3; 3 comparisons: check mid=7 (found); at most 3 needed.
व्याख्या (हिन्दी) सूचकांक 3 पर मध्य=7; 3 तुलनाएँ: जाँच मध्य=7 (पाया गया); अधिकतम 3 की आवश्यकता है।
🎯 Exam Perspective
Data Structures and Algorithms ("Arrays" sub-topic) के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC CGL, IBPS, RRB और State-level परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें।

Question 11

EN + हिं Medium
GB Ternary search divides array into:
IN टर्नरी खोज सरणी को इसमें विभाजित करती है:
Two halves दो हिस्से
Three parts (finds max/min of unimodal function) तीन भाग (यूनिमॉडल फ़ंक्शन का अधिकतम/मिनट ज्ञात करता है)
Three equal parts for searching खोज के लिए तीन बराबर भाग
Random parts यादृच्छिक भाग
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Ternary search: for unimodal functions, O(log3(n)).
व्याख्या (हिन्दी) टर्नरी खोज: यूनिमॉडल फ़ंक्शंस के लिए, O(log3(n))।
🎯 Exam Perspective
यह सवाल Data Structures and Algorithms ("Arrays" sub-topic) category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें।

Question 12

EN + हिं Medium
GB Suffix array is used for:
IN प्रत्यय सरणी का उपयोग इसके लिए किया जाता है:
Sorting suffixes प्रत्ययों को क्रमबद्ध करना
Efficient string operations (search, LCP) by storing sorted suffixes क्रमबद्ध प्रत्ययों को संग्रहीत करके कुशल स्ट्रिंग संचालन (खोज, एलसीपी)।
Prefix operations उपसर्ग संचालन
Hash table हैश तालिका
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Suffix array enables O(m log n) pattern matching.
व्याख्या (हिन्दी) प्रत्यय सरणी O(m log n) पैटर्न मिलान को सक्षम बनाती है।
🎯 Exam Perspective
यह प्रश्न Data Structures and Algorithms ("Arrays" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें।

Question 13

EN + हिं Medium
GB The maximum subarray sum problem is solved by:
IN अधिकतम उपसरणी योग समस्या का समाधान निम्न द्वारा किया जाता है:
Brute force O(n^3) क्रूर बल O(n^3)
Kadane algorithm in O(n) O(n) में कडेन एल्गोरिथम
Divide and conquer only केवल बांटो और राज करो
DP always O(n^2) DP हमेशा O(n^2)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Kadane: O(n) max subarray sum.
व्याख्या (हिन्दी) कदाने: O(n) अधिकतम उपसरणी योग।
🎯 Exam Perspective
Data Structures and Algorithms ("Arrays" sub-topic) से जुड़ा यह सवाल — difficulty level "Medium" उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो।

Question 14

EN + हिं Medium
GB Dutch National Flag problem sorts array of 0s, 1s, 2s in:
IN डच राष्ट्रीय ध्वज समस्या 0s, 1s, 2s की सारणी को क्रमबद्ध करती है:
O(n log n) ओ(एन लॉग एन)
O(n) using three-way partitioning O(n) तीन-तरफ़ा विभाजन का उपयोग करते हुए
O(n^2) ओ(एन^2)
O(1) हे(1)
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Three pointers: O(n) single pass.
व्याख्या (हिन्दी) तीन संकेतक: ओ(एन) सिंगल पास।
🎯 Exam Perspective
Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Arrays" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें।

Question 15

EN + हिं Medium
GB Binary search on sorted array {1,3,5,7,9,11,13}: how many comparisons to find 7?
IN क्रमबद्ध सरणी पर बाइनरी खोज {1,3,5,7,9,11,13}: 7 खोजने के लिए कितनी तुलनाएँ?
1 1
2 2
3 3
4 4
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) mid=7 at index 3; 3 comparisons: check mid=7 (found); at most 3 needed.
व्याख्या (हिन्दी) सूचकांक 3 पर मध्य=7; 3 तुलनाएँ: जाँच मध्य=7 (पाया गया); अधिकतम 3 की आवश्यकता है।
🎯 Exam Perspective
अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Arrays" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Medium"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें।