706 Question 706 EN + हिं Medium GB Finding majority element (appearing > n/2 times) is solved by: IN बहुसंख्यक तत्व ढूँढना (प्रकट होना > n/2 बार) निम्न द्वारा हल किया जाता है: A Sorting छंटाई B Boyer-Moore Voting Algorithm in O(n) ओ(एन) में बॉयर-मूर वोटिंग एल्गोरिदम C Hash map हैश मानचित्र D Binary search द्विआधारी खोज ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Boyer-Moore Voting: O(n) time, O(1) space. व्याख्या (हिन्दी) बॉयर-मूर वोटिंग: O(n) समय, O(1) स्थान। 🎯 Exam Perspective Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions The output of: int n=16; while(n>1){n/=2; cout What is the output: cout The output of: int x=255; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
707 Question 707 EN + हिं Medium GB Reservoir sampling is used for: IN जलाशय नमूनाकरण का उपयोग इसके लिए किया जाता है: A Sorting large data बड़े डेटा को क्रमबद्ध करना B Randomly selecting k items from stream of unknown size in O(n) O(n) में अज्ञात आकार की स्ट्रीम से यादृच्छिक रूप से k आइटम का चयन करना C Hashing हैशिंग D Graph sampling ग्राफ़ नमूनाकरण ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Reservoir sampling: uniform random sample from stream. व्याख्या (हिन्दी) जलाशय नमूनाकरण: धारा से एकसमान यादृच्छिक नमूना। 🎯 Exam Perspective यह सवाल Data Structures and Algorithms category का है — difficulty level "Medium", और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions The output of: int n=7; cout n & (n-1) equals 0 iff n is: The output of: int x=255; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
708 Question 708 EN + हिं GB The output of: int x=5; cout<<((x%2)==0?"Even":"Odd"); IN का आउटपुट: int x=5; अदालत A Even यहां तक की B Odd विषम D 1 1 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 5%2=1, not 0, so Odd. व्याख्या (हिन्दी) 5%2=1, 0 नहीं, अत: अजीब। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: cout The output of: int a=10,b=5; a=a^b; b=a^b; a=a^b; cout The output of: for(int i=1;i 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
709 Question 709 EN + हिं GB The output of: int n=100; int sum=n*(n+1)/2; cout< IN इसका आउटपुट: int n=100; int sum=n*(n+1)/2; अदालत A 5050 5050 B 4950 4950 C 5100 5100 D 100 100 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Gauss formula: 100*101/2 = 5050. व्याख्या (हिन्दी) गॉस सूत्र: 100*101/2 = 5050। 🎯 Exam Perspective Data Structures and Algorithms से जुड़ा यह सवाल उन students के लिए काम का है जो Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions The output of: int x=12; cout The output of: int n=7; cout The output of: int n=16; while(n>1){n/=2; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
710 Question 710 EN + हिं GB The output of: int a=10,b=5; a=a^b; b=a^b; a=a^b; cout< IN The output of: int a=10,b=5; ए=ए^बी; बी=ए^बी; ए=ए^बी; अदालत A 5 10 5 10 B 10 5 10 5 C 15 15 15 15 D 0 0 0 0 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) XOR swap: a=5, b=10. व्याख्या (हिन्दी) एक्सओआर स्वैप: ए=5, बी=10। 🎯 Exam Perspective SSC, Railway, Banking और State PCS जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: cout The output of: int x=12; cout The output of: cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
711 Question 711 EN + हिं GB The output of: for(int i=1;i<=5;i++) cout< IN का आउटपुट: for(int i=1;i A 1 3 6 10 15 1 3 6 10 15 B 1 2 3 4 5 1 2 3 4 5 C 2 6 12 20 30 2 6 12 20 30 D 1 4 9 16 25 1 4 9 16 25 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Triangular numbers: 1, 3, 6, 10, 15. व्याख्या (हिन्दी) त्रिकोणीय संख्याएँ: 1, 3, 6, 10, 15. 🎯 Exam Perspective अगर आप SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions The output of: int n=7; cout n & (n-1) equals 0 iff n is: The output of: int n=16; while(n>1){n/=2; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
712 Question 712 EN + हिं GB The output of: int n=16; while(n>1){n/=2; cout< IN का आउटपुट: int n=16; जबकि(n>1){n/=2; अदालत A 8 4 2 1 8 4 2 1 B 8 4 2 8 4 2 C 16 8 4 2 16 8 4 2 D 4 2 1 4 2 1 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 16/2=8, 8/2=4, 4/2=2, 2/2=1. व्याख्या (हिन्दी) 16/2=8, 8/2=4, 4/2=2, 2/2=1। 🎯 Exam Perspective Data Structures and Algorithms के इस प्रश्न को कई प्रतियोगी परीक्षाओं जैसे UPSC, SSC, Banking और Police भर्ती में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions Finding majority element (appearing > n/2 times) is sol... The output of: int n=100; int sum=n*(n+1)/2; cout What is the output: cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
713 Question 713 EN + हिं GB The output of: int x=255; cout<<(x & 0x0F); IN इसका आउटपुट: int x=255; अदालत A 255 255 B 15 15 C 240 240 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 255=11111111, 0x0F=00001111; AND=00001111=15. व्याख्या (हिन्दी) 255=11111111, 0x0F=00001111; तथा=00001111=15. 🎯 Exam Perspective यह सवाल Data Structures and Algorithms category का है, और Railway, SSC, Banking और Defence परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions What is the output: cout The output of: int x=170; cout Finding majority element (appearing > n/2 times) is sol... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
714 Question 714 EN + हिं GB The output of: int x=170; cout<<(x & 0xFF)<<" "<<(x>>4); IN का आउटपुट: int x=170; अदालत A 170 10 170 10 B 170 26 170 26 C 10 170 10 170 D 26 170 26 170 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 170&255=170; 170>>4=10 (170/16=10). व्याख्या (हिन्दी) 170&255=170; 170>>4=10 (170/16=10)। 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर SSC, Railway, Banking और State PCS जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: cout The output of: int x=5; cout What is the output: cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
715 Question 715 EN + हिं GB The output of: int n=7; cout<<__builtin_popcount(n); IN का आउटपुट: int n=7; अदालत A 7 7 B 3 3 C 1 1 D Error गलती ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 7=0111 has 3 set bits; __builtin_popcount(7)=3. व्याख्या (हिन्दी) 7=0111 में 3 सेट बिट हैं; __बिल्टइन_पॉपकाउंट(7)=3. 🎯 Exam Perspective Data Structures and Algorithms से जुड़ा यह सवाल उन students के लिए काम का है जो SSC CGL, IBPS, RRB और State-level परीक्षाओं की तैयारी कर रहे हैं। बेहतर होगा कि explanation पढ़कर concept clear करें, ताकि exam में similar प्रश्न आने पर confusion न हो। 🔗 Related Questions n & (n-1) equals 0 iff n is: The output of: int x=5; cout The output of: cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
716 Question 716 EN + हिं GB The output of: cout<<__builtin_clz(8); on 32-bit int? IN का आउटपुट: कॉउट A 3 3 B 28 28 C 29 29 D 4 4 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 8=...00001000; leading zeros before first 1 bit = 32-4=28. व्याख्या (हिन्दी) 8=...00001000; पहले 1 बिट से पहले अग्रणी शून्य = 32-4=28। 🎯 Exam Perspective UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में Data Structures and Algorithms से सवाल अक्सर पूछे जाते हैं। इसलिए सिर्फ answer रटने के बजाय, नीचे दी गई explanation को ध्यान से पढ़ें और concept समझें। 🔗 Related Questions What is the output: cout The output of: int x=12; cout Finding majority element (appearing > n/2 times) is sol... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
717 Question 717 EN + हिं GB The output of: int x=12; cout<<(x&(x-1)); IN का आउटपुट: int x=12; अदालत B 8 8 C 4 4 D 12 12 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 12=1100, 11=1011; 12&11=1000=8. व्याख्या (हिन्दी) 12=1100, 11=1011; 12&11=1000=8. 🎯 Exam Perspective अगर आप Railway, SSC, Banking और Defence परीक्षाओं की तैयारी कर रहे हैं, तो Data Structures and Algorithms का यह topic आपके लिए महत्वपूर्ण है। Exam में accuracy बढ़ाने के लिए हर सवाल की explanation जरूर पढ़ें। 🔗 Related Questions What is the output: cout The output of: int x=5; cout The output of: cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
718 Question 718 EN + हिं Medium GB n & (n-1) equals 0 iff n is: IN n और (n-1) 0 के बराबर है यदि n है: A Even यहां तक की B Power of 2 (or n=0) 2 की शक्ति (या n=0) C Odd विषम D Prime मुख्य ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) Only power of 2 has single set bit; n-1 clears it. व्याख्या (हिन्दी) केवल 2 की शक्ति में सिंगल सेट बिट है; n-1 इसे साफ़ करता है। 🎯 Exam Perspective Data Structures and Algorithms के इस प्रश्न को — difficulty level "Medium" कई प्रतियोगी परीक्षाओं जैसे SSC, Railway, Banking और State PCS में repeat होते देखा गया है। Concept clarity के लिए explanation section जरूर पढ़ें। 🔗 Related Questions What is the output: cout What is the output: cout The output of: int a=10,b=5; a=a^b; b=a^b; a=a^b; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
719 Question 719 EN + हिं GB What is the output: cout<<(0b1010 | 0b1100); IN आउटपुट क्या है: cout A 14 14 B 12 12 C 10 10 D 2 2 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 1010|1100=1110=14. व्याख्या (हिन्दी) 1010|1100=1110=14. 🎯 Exam Perspective यह सवाल Data Structures and Algorithms category का है, और SSC CGL, IBPS, RRB और State-level परीक्षाओं के exam pattern में इस तरह के questions common हैं। Answer choose करने के बाद दिया गया explanation जरूर पढ़ें। 🔗 Related Questions The output of: int n=7; cout The output of: int n=100; int sum=n*(n+1)/2; cout Finding majority element (appearing > n/2 times) is sol... 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)
720 Question 720 EN + हिं GB What is the output: cout<<(0b1010 & 0b1100); IN आउटपुट क्या है: cout A 14 14 B 8 8 C 2 2 D 10 10 ✅ Correct Answer: 💡 Explanation / व्याख्या Explanation (English) 1010&1100=1000=8. व्याख्या (हिन्दी) 1010&1100=1000=8. 🎯 Exam Perspective यह प्रश्न Data Structures and Algorithms की तैयारी करने वाले अभ्यर्थियों के लिए उपयोगी है। इस तरह के प्रश्न अक्सर UPSC, SSC, Banking और Police भर्ती जैसी परीक्षाओं में पूछे जाते रहे हैं, इसलिए concept और explanation दोनों को ध्यान से समझें, सिर्फ उत्तर याद न करें। 🔗 Related Questions The output of: cout The output of: int x=5; cout The output of: int n=16; while(n>1){n/=2; cout 📚 Related Topic Introduction to DSA (819) Arrays (16) Linked List (25)