301 Question 301 EN + हिं GB The output of: string s="12345"; int n=stoi(s); cout< IN इसका आउटपुट: स्ट्रिंग s='12345'; int n=stoi(s); अदालत A 1234512345 1234512345 B 24690 24690 C 12345 12345 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) stoi converts to 12345; 12345*2=24690. व्याख्या (हिन्दी) Stoi 12345 में परिवर्तित हो जाता है; 12345*2=24690. 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions The output of: auto it=find(begin({5,3,8,1,9}),end({5,3... The output of: priority_queue pq; pq.push({1,2}); pq.pu... What is the time complexity of std::sort? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
302 Question 302 EN + हिं GB The output of: int n=42; string s=to_string(n); cout< IN का आउटपुट: int n=42; स्ट्रिंग s=to_string(n); अदालत A 2 2 B 42 42 C 1 1 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) "42" has 2 characters. व्याख्या (हिन्दी) "42" में 2 अक्षर हैं। 🎯 Exam Perspective SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: int arr[]={5,2,8,1,9}; int n=5; for(int... The output of: auto it=find(begin({5,3,8,1,9}),end({5,3... What is the time complexity of std::sort? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
303 Question 303 EN + हिं GB The output of: vector v={"Hello","World"}; string result=accumulate(v.begin(),v.end(),string("")); cout< IN इसका आउटपुट: वेक्टर v={"हैलो","वर्ल्ड"}; स्ट्रिंग परिणाम=संचय(v.begin(),v.end(),string("")); अदालत A HelloWorld हैलो वर्ल्ड B Hello World हैलो वर्ल्ड C Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Accumulate with string: "" + "Hello" + "World" = "HelloWorld". व्याख्या (हिन्दी) स्ट्रिंग के साथ जमा करें: "" + "हैलो" + "वर्ल्ड" = "हैलोवर्ल्ड"। 🎯 Exam Perspective अगर आप UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions The output of: auto it=find(begin({5,3,8,1,9}),end({5,3... The output of: int arr[]={5,2,8,1,9}; int n=5; for(int... The output of: map freq; string words[]={"a","b","a","c... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
304 Question 304 EN + हिं GB The output of: auto f=function([](int n){return n*n;}); cout< IN इसका आउटपुट: auto f=function([](int n){return n*n;}); अदालत A 14 14 B 49 49 C 7 7 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::function wraps lambda; 7*7=49. व्याख्या (हिन्दी) std::फ़ंक्शन लैम्ब्डा को लपेटता है; 7*7=49. 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे Railway, SSC, Banking और Defence परीक्षाओं में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions The output of: vector v={"Hello","World"}; string resul... The output of: auto it=find(begin({5,3,8,1,9}),end({5,3... The output of: priority_queue pq; pq.push({1,2}); pq.pu... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
305 Question 305 EN + हिं GB The output of: map freq; string words[]={"a","b","a","c","b","a"}; for(auto w:words)freq[w]++; cout< IN इसका आउटपुट: मानचित्र आवृत्ति; स्ट्रिंग शब्द[]={"a","b","a","c","b","a"}; for(auto w:words)freq[w]++; अदालत A 321 321 B 123 123 C 312 312 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) a appears 3 times, b 2 times, c 1 time. व्याख्या (हिन्दी) a 3 बार, b 2 बार, c 1 बार प्रकट होता है। 🎯 Exam Perspective यह सवाल Data Structures and Algorithms ("Introduction to DSA" sub-topic) category का है, और SSC, Railway, Banking और State PCS के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions The output of: priority_queue pq; pq.push({1,2}); pq.pu... Tim sort (used in Python and Java) combines: Bucket sort is efficient when input is: 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
306 Question 306 EN + हिं GB The output of: vector> v={{3,1},{1,3},{2,2}}; sort(v.begin(),v.end()); cout< IN का आउटपुट: वेक्टर v={{3,1},{1,3},{2,2}}; क्रमबद्ध करें (v.begin(),v.end()); अदालत A 31 31 B 13 13 C 22 22 D 11 11 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Default sort on pair: sorts by first then second; {1,3} is smallest. व्याख्या (हिन्दी) जोड़ी पर डिफ़ॉल्ट सॉर्ट: पहले और फिर दूसरे के आधार पर सॉर्ट करें; {1,3} सबसे छोटा है. 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC CGL, IBPS, RRB और State-level परीक्षाओं जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: int n=42; string s=to_string(n); cout The output of: vector v={"Hello","World"}; string resul... Which sort is best for nearly sorted arrays? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
307 Question 307 EN + हिं GB The output of: priority_queue> pq; pq.push({1,2}); pq.push({3,1}); pq.push({2,3}); cout< IN इसका आउटपुट: प्राथमिकता_क्यू पीक्यू; pq.push({1,2}); pq.push({3,1}); pq.push({2,3}); अदालत A 1 1 B 2 2 C 3 3 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Max-heap on pair: {3,1} has highest first element = 3. व्याख्या (हिन्दी) जोड़ी पर अधिकतम-ढेर: {3,1} में उच्चतम पहला तत्व = 3 है। 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) से जुड़ा यह सवाल उन students के लिए काम का है जो UPSC, SSC, Banking और Police भर्ती की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions Bucket sort is efficient when input is: The output of: vector v={"Hello","World"}; string resul... The output of: int n=42; string s=to_string(n); cout 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
308 Question 308 EN + हिं GB The output of: auto it=find(begin({5,3,8,1,9}),end({5,3,8,1,9}),8); cout<<*it; IN इसका आउटपुट: auto it=find(begin({5,3,8,1,9}),end({5,3,8,1,9}),8); अदालत A 5 5 B 3 3 C 8 8 D 9 9 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) find returns iterator to first occurrence of 8. व्याख्या (हिन्दी) 8 की पहली घटना पर रिटर्न इटरेटर ढूंढें। 🎯 Exam Perspective Railway, SSC, Banking और Defence परीक्षाओं जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: map freq; string words[]={"a","b","a","c... Tim sort (used in Python and Java) combines: The output of: vector v={"Hello","World"}; string resul... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
309 Question 309 EN + हिं Hard GB What is the time complexity of std::sort? IN std::sort की समय जटिलता क्या है? A O(n^2) ओ(एन^2) B O(n log n) average ओ(एन लॉग एन) औसत C O(n) पर) D O(log n) ओ(लॉग एन) ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) std::sort is O(n log n) average (introsort). व्याख्या (हिन्दी) std::sort O(n log n) औसत (introsort) है। 🎯 Exam Perspective अगर आप SSC, Railway, Banking और State PCS की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है — difficulty level "Hard"। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions The output of: vector v={"Hello","World"}; string resul... Which sort is best for nearly sorted arrays? The output of: auto it=find(begin({5,3,8,1,9}),end({5,3... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
310 Question 310 EN + हिं Hard GB What is the space complexity of quicksort (average)? IN क्विकॉर्ट (औसत) की स्थानिक जटिलता क्या है? A O(1) हे(1) B O(log n) recursion stack ओ(लॉग एन) रिकर्सन स्टैक C O(n) पर) D O(n^2) ओ(एन^2) ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) QuickSort average: O(log n) stack depth. व्याख्या (हिन्दी) क्विकसॉर्ट औसत: ओ(लॉग एन) स्टैक गहराई। 🎯 Exam Perspective Data Structures and Algorithms ("Introduction to DSA" sub-topic) के इस प्रश्न को — difficulty level "Hard" कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the time complexity of std::sort? The output of: priority_queue pq; pq.push({1,2}); pq.pu... The output of: vector v={{3,1},{1,3},{2,2}}; sort(v.beg... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
311 Question 311 EN + हिं Medium GB Which sort is best for nearly sorted arrays? IN लगभग क्रमबद्ध सरणियों के लिए कौन सा प्रकार सर्वोत्तम है? A Quick Sort त्वरित छँटाई B Merge Sort मर्ज सॉर्ट करें C Insertion Sort प्रविष्टि क्रम D Heap Sort ढेर बनाएं और छांटें ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Insertion sort is O(n) for nearly sorted arrays. व्याख्या (हिन्दी) लगभग क्रमबद्ध सरणियों के लिए सम्मिलन सॉर्ट O(n) है। 🎯 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 जरूर पढ़ें। 🔗 Related Questions Bucket sort is efficient when input is: The output of: priority_queue pq; pq.push({1,2}); pq.pu... The output of: map freq; string words[]={"a","b","a","c... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
312 Question 312 EN + हिं Medium GB Counting sort is not a comparison sort and runs in: IN गिनती सॉर्ट तुलनात्मक सॉर्ट नहीं है और इसमें चलता है: A O(n log n) ओ(एन लॉग एन) B O(n + k) where k is range of values O(n + k) जहां k मानों की सीमा है C O(n^2) ओ(एन^2) D O(k) ठीक है) ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Counting sort: O(n+k) time and space. व्याख्या (हिन्दी) गिनती क्रम: O(n+k) समय और स्थान। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms ("Introduction to DSA" sub-topic) की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है — difficulty level "Medium"। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: string s="12345"; int n=stoi(s); cout Tim sort (used in Python and Java) combines: The output of: priority_queue pq; pq.push({1,2}); pq.pu... 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
313 Question 313 EN + हिं Medium GB Bucket sort is efficient when input is: IN इनपुट होने पर बकेट सॉर्ट कुशल होता है: A Any data कोई भी डेटा B Uniformly distributed in a known range ज्ञात सीमा में समान रूप से वितरित C Sorted already पहले से ही क्रमबद्ध D Integer only केवल पूर्णांक ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Bucket sort: O(n) average for uniform distribution. व्याख्या (हिन्दी) बकेट सॉर्ट: समान वितरण के लिए 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 न हो। 🔗 Related Questions The output of: map freq; string words[]={"a","b","a","c... The output of: int arr[]={5,2,8,1,9}; int n=5; for(int... The output of: string s="12345"; int n=stoi(s); cout 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
314 Question 314 EN + हिं Medium GB Tim sort (used in Python and Java) combines: IN टिम सॉर्ट (पायथन और जावा में प्रयुक्त) जोड़ता है: A Only merge sort केवल मर्ज सॉर्ट करें B Insertion sort for small runs + merge sort छोटे रन के लिए इंसर्शन सॉर्ट + मर्ज सॉर्ट C Quick sort + heap sort त्वरित सॉर्ट + ढेर सॉर्ट D All four sorts सभी चार प्रकार ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) TimSort: insertion sort for small arrays + merge for merging. व्याख्या (हिन्दी) टिमसॉर्ट: छोटे सरणियों के लिए सम्मिलन सॉर्ट + विलय के लिए मर्ज। 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms ("Introduction to DSA" sub-topic) से सवाल अक्सर पूछे जाते हैं — difficulty level "Medium"। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions The output of: auto f=function([](int n){return n*n;});... The output of: map freq; string words[]={"a","b","a","c... Which sort is best for nearly sorted arrays? 📚 Related Topic Arrays (16) Linked List (25) Stack (14)
315 Question 315 EN + हिं GB The output of: int arr[]={5,2,8,1,9}; int n=5; for(int i=0;iarr[j+1]) swap(arr[j],arr[j+1]); cout< IN इसका आउटपुट: int arr[]={5,2,8,1,9}; int n=5; for(int i=0;i A 1 1 B 5 5 C 2 2 D 9 9 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Bubble sort: after sorting arr[0]=1. व्याख्या (हिन्दी) बबल सॉर्ट: arr[0]=1 सॉर्ट करने के बाद। 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms ("Introduction to DSA" sub-topic) का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions Which sort is best for nearly sorted arrays? The output of: string s="12345"; int n=stoi(s); cout Bucket sort is efficient when input is: 📚 Related Topic Arrays (16) Linked List (25) Stack (14)