Majority Element | Brute- Better-Best Approach | Moore's Voting Algorithm | & Pair Sum

  Рет қаралды 105,937

Apna College

Apna College

Күн бұрын

Пікірлер: 383
@PriyanshuVerma-hh9bq
@PriyanshuVerma-hh9bq 2 ай бұрын
keep uploading lectures, i m following this series very consistently
@bigbrain7933
@bigbrain7933 Ай бұрын
bhai question thaa tune pairsum or majority element khud se soch liya tha
@sheevanulhaq3912
@sheevanulhaq3912 Ай бұрын
​@@bigbrain7933 brute force approach to khud se soch liya tha but optimization abhi nhi ho rha Aa jayega with time ✌️
@PrithaMajumder
@PrithaMajumder 12 күн бұрын
Watched "Majority Element | Brute- Better-Best Approach | Moore's Voting Algorithm | & Pair Sum" on 16/11/2024. ✅ Completely understood the concepts explained. 📝 Made thorough notes while watching. Thank You So Much for This Amazing Lecture 😊
@StudywithmeAkku
@StudywithmeAkku 2 ай бұрын
DSA series Day-11 completed I hope I will maintain this consistency with shraddha maam .Thankyou so much mam for this series and also thanks to Aman sir who behinde all of that❤🎉
@jeffrinsamuel5358
@jeffrinsamuel5358 2 ай бұрын
Are you in 1st year?
@StudywithmeAkku
@StudywithmeAkku 2 ай бұрын
@@jeffrinsamuel5358 yes
@jeffrinsamuel5358
@jeffrinsamuel5358 2 ай бұрын
@@StudywithmeAkku Nicee..Same here
@bigbrain7933
@bigbrain7933 Ай бұрын
bhai question thaa tune pair sum or majority element khud se soch liya tha
@Shubham_Karne
@Shubham_Karne 2 ай бұрын
Thanks a lot shraddha didi I am learning a lot from you considering web development or DSA you are the one who clears every concept in DSA I am being confident in DSA just bcuz of you didi I can't thank you enough for these precious stuffs❤😊
@vishnuvardhan2687
@vishnuvardhan2687 2 ай бұрын
Successfully completed ✅ Day 11 lecture, thank you shradha maam for your valuable lectures to us 😊😊
@surajdevv
@surajdevv 2 ай бұрын
Keep going
@shah4304
@shah4304 2 ай бұрын
Shardha Ma'am Brute force code ko bhi write kr deti hai , jo bhut achi cheej hai . Great
@komalkaushal2695
@komalkaushal2695 2 ай бұрын
Completed and enjoying everyday with your lectures🎉
@bigbrain7933
@bigbrain7933 Ай бұрын
bhai pari sum or majority element ka logic mam ke padane se pahle he aagya tha kya
@bigbrain7933
@bigbrain7933 Ай бұрын
plese reply
@devilsushgaming8151
@devilsushgaming8151 2 күн бұрын
@@bigbrain7933 yess broo
@mohammadparves8709
@mohammadparves8709 Ай бұрын
The most thing I like about this series is that solving problems of leetcode
@namangupta7271
@namangupta7271 2 ай бұрын
thank you very much mam you are the best teacher who teach dsa on youtube
@bhavneet8416
@bhavneet8416 2 ай бұрын
Next Level and thinking appriciate mam >>> Respect
@azharalibhutto1209
@azharalibhutto1209 2 ай бұрын
Thank you so so much for teaching DSA ❤❤❤❤❤❤
@haiderali0801
@haiderali0801 2 ай бұрын
Thankyou shradha dii!
@CodeSurgery-j8j
@CodeSurgery-j8j Ай бұрын
Congratulations on your well-deserved 6M subscribers.🙂🙂🙃
@Intelli_Jayant
@Intelli_Jayant 2 ай бұрын
Please keep uploading, We will keep learning
@Ironman-z2t
@Ironman-z2t Ай бұрын
Lecture 11 is completed. Thanks ❤mam.
@bigbrain7933
@bigbrain7933 Ай бұрын
bhai pari sum or majority element ka logic mam ke padane se pahle he aagya tha kya
@AamilAli2003
@AamilAli2003 Ай бұрын
23:51 array sort karne ke baad mid pe chale jao aur first aur last se compare karlo agar same hai to return kardo nhi to mid return karado if elseif aur else laga ke ho jayga
@ninadkulkarni3530
@ninadkulkarni3530 Ай бұрын
bhai agar sort kardiya to floor n/2 +1th element hi ans hoga na?
@adityasingh3365
@adityasingh3365 2 ай бұрын
Completed Lecture 11; Thankyou Mam;
@CreativeDevLab
@CreativeDevLab 23 күн бұрын
it blew my mind 🤯🤯
@AniketKumar-tu5cd
@AniketKumar-tu5cd 2 ай бұрын
class Solution { public: int majorityElement(vector& nums) { sort(nums.begin(),nums.end()); return nums[nums.size()/2]; } };
@bigbrain7933
@bigbrain7933 Ай бұрын
hey bro i want to talk with you
@Abhi_Singh-_-4
@Abhi_Singh-_-4 2 ай бұрын
Lecture done. 22-09-24. Thank you maam the different questions really help building logic.
@killerronak0075
@killerronak0075 2 ай бұрын
thankyou so much for this great free resource❤❤❤❤
@anushrisamrut-6263
@anushrisamrut-6263 2 ай бұрын
Successfully completed day 11✅
@shubhampandey1754
@shubhampandey1754 2 ай бұрын
DSA series Day 11 completed successfully
@syedshuaib8746
@syedshuaib8746 2 ай бұрын
The condition is that the number will be present >n/2. if we sort by default the middle element will be majority element then this much will be enough int n=nums.size( ); sort(nums . begin ( ) , nums . end ( ) ); return nums[n/2] ;
@Kardam-Codes
@Kardam-Codes 2 ай бұрын
But the sort() function itself makes the time complexity nlog(n)
@animeshdubey941
@animeshdubey941 2 ай бұрын
​@@Kardam-Codesyep
@RithushaKeerthi
@RithushaKeerthi Ай бұрын
this works for the odd number of elements in the array not for even count ,right?
@SanyamJain-m4c
@SanyamJain-m4c Ай бұрын
bro i tapplied it same going to comment but then see yours
@diwanshukumar9866
@diwanshukumar9866 Ай бұрын
@@RithushaKeerthi yes, it's for odd number of elems bcoz it's easy level question
@alwaysanujsharma
@alwaysanujsharma 2 ай бұрын
38:58 Day 11 completed 👌💯
@PrinceUmmer
@PrinceUmmer 2 ай бұрын
Love from Jammu and Kashmir ❤❤❤❤❤❤❤❤❤
@50_arshidahmad91
@50_arshidahmad91 2 ай бұрын
@proCoderShivam
@proCoderShivam 2 ай бұрын
Lec 11 Completed ☑
@Rajakumar29sep
@Rajakumar29sep 2 ай бұрын
Thankyou✨Done✨Completed✨
@aniketvishwakarma739
@aniketvishwakarma739 2 ай бұрын
Lecture 11 complete👌💯
@prashanthreddy9935
@prashanthreddy9935 2 ай бұрын
Lecture 11 Completed On 17-09-24 at 9:07PM thankYou Mam❤🎉
@bloodyfiregaming9790
@bloodyfiregaming9790 2 ай бұрын
Lecture done successfully 😁
@animeshdubey941
@animeshdubey941 2 ай бұрын
Excellent teaching 👏
@YoursEditzz
@YoursEditzz 2 ай бұрын
Don’t stop posting for this series
@RASHIVishwakarma-p5g
@RASHIVishwakarma-p5g Ай бұрын
lecture no 11 completed thankyou mam
@earthlinkdesignersedtech3531
@earthlinkdesignersedtech3531 2 ай бұрын
Day-11 Completed 👍💪
@bhavenprajapat851
@bhavenprajapat851 2 ай бұрын
Waiting for that 😊notifications ❤
@IRONMAN-kq6dx
@IRONMAN-kq6dx 2 ай бұрын
Day 11 complete 21 September 2024 ❤ thankyou Sharadha Mam 😊...
@CodewithAnuragBassu
@CodewithAnuragBassu 2 ай бұрын
awasome series❤❤
@shreyaG438
@shreyaG438 2 ай бұрын
can we known until when u will complete this playlist
@Shaswat_Shrivas
@Shaswat_Shrivas 2 ай бұрын
Day 11 Completed!
@AiTrailerVault
@AiTrailerVault 2 ай бұрын
Day 9 of asking related notes 😮
@MoNiL_DeVLuK1111
@MoNiL_DeVLuK1111 2 ай бұрын
L-11 DONE 🚀
@sakethsai5557
@sakethsai5557 2 ай бұрын
Q)Find the pairsum from array = [3,4,7,8] with target =11? ans: pairsum = (7,4) reason (shraddha=7 & aman= 4)😁
@jeffrinsamuel5358
@jeffrinsamuel5358 2 ай бұрын
Nice observation 😃👍🏻
@animeshdubey941
@animeshdubey941 2 ай бұрын
🎉😂
@ammarshaikh4054
@ammarshaikh4054 Ай бұрын
itna dimag agar padhai me lagaya hota toh aaj ias hota
@jeffrinsamuel5358
@jeffrinsamuel5358 Ай бұрын
@@ammarshaikh4054 Arey woh padhai hi toh kar rha hai
@yuvrajnegi1023
@yuvrajnegi1023 2 ай бұрын
In majority element problem.After sorting we return n/2 element of array because a majority element occurs more than n/2 time. But it's not optimize it take O(nlogn) time complexity❤
@anandmaurya6384
@anandmaurya6384 2 ай бұрын
for sorted array we can use : return arr[n/2];
@KalariyaDhruvi
@KalariyaDhruvi 2 ай бұрын
Thank you so much mam u are great 🎉 I also learn c language from u 😊
@AjayKumar-uf6zq
@AjayKumar-uf6zq 2 ай бұрын
Hi
@chill_guy9240
@chill_guy9240 2 ай бұрын
23\09\2024 i am this much consistent about something for the first time in my life I have watched 7 videos in 8 day(one day i was sick)
@Ayush-rx9pk
@Ayush-rx9pk Ай бұрын
3 semester watched this session on 9 october finished eleventh lecture
@lamborzgamer2638
@lamborzgamer2638 15 күн бұрын
Thank you so much mam🔥🔥🔥🔥
@sheScripts
@sheScripts Ай бұрын
Q. PAIR SUM - What if multiple pairs are available?? Let's say we have an array [2, 5, 7, 8, 10, 11, 15] and target is 13, pair could be 2,11 and 5,8 Solution (in JavaScript): let arr = [2, 5, 7, 8, 10,11,15] let target = 13; let i = 0; let j = arr.length - 1; while (i < j) { let pairSum = arr[i] + arr[j]; if (pairSum < target) { i++; } else if (pairSum > target) { j--; } else { console.log(arr[i], arr[j]); i++; j--; } }
@anmolprashar6593
@anmolprashar6593 2 ай бұрын
Thank you so much
@sam-s2t4r
@sam-s2t4r 2 ай бұрын
Completed 😊
@ssquadisid1858
@ssquadisid1858 2 ай бұрын
Completed on 22:09;24:: 21:43
@Shubham20148
@Shubham20148 2 ай бұрын
Thanks for video 😊
@mansishirode9907
@mansishirode9907 Ай бұрын
Completed ❤the lec
@bigbrain7933
@bigbrain7933 Ай бұрын
bhai pari sum or majority element ka logic mam ke padane se pahle he aagya tha kya
@mazedul1448
@mazedul1448 2 ай бұрын
Thank you ma'am
@rcreations9617
@rcreations9617 2 ай бұрын
Day 11 completed
@PriyaPandey-ge4wv
@PriyaPandey-ge4wv 2 ай бұрын
successfully completed~!!
@SagarMaheshwariS
@SagarMaheshwariS 2 ай бұрын
Day 11 completed ✅
@jhonmax4540
@jhonmax4540 2 ай бұрын
Lecture-10✅(done)
@zee.techie
@zee.techie 2 ай бұрын
Big fan from Pakistan ❤❤
@SharoonGill-q7v
@SharoonGill-q7v 2 ай бұрын
Thank u for this ❤
@itz_akash_Gupta
@itz_akash_Gupta 2 ай бұрын
DAY -11 COMPLETED
@mohdyasir5421
@mohdyasir5421 2 ай бұрын
Thanks a lot 👍
@Damdim527
@Damdim527 Ай бұрын
class Solution { public: int majorityElement(vector& nums) { unordered_mapmp; int h=nums.size(); for(int i=0;ih/2){ return i.first; } } return -1; } };
@ayushjha1595
@ayushjha1595 2 ай бұрын
Lec 11 completed
@PriyanshuMishra-ze6ol
@PriyanshuMishra-ze6ol 2 ай бұрын
Thank you mam ❤
@ShreyaPriyadarshini
@ShreyaPriyadarshini Ай бұрын
Day 9 of DSA journey , completed this lecture on 21.10.2024 at 12:07 am
@likitha2005
@likitha2005 2 ай бұрын
Day-11 Done ✅
@moinansari3729
@moinansari3729 2 ай бұрын
Sep 16, 2024, Lec 11 Completed
@muhammadarhamshahbaz4805
@muhammadarhamshahbaz4805 2 ай бұрын
Completed 💯
@Ankit2u-IIT
@Ankit2u-IIT Ай бұрын
Completed on 14/10/24. I hope there will be practice problems in the future videos.
@PRASHANTSHRINGI
@PRASHANTSHRINGI 2 ай бұрын
All lectures completed
@prashantyevate
@prashantyevate 2 ай бұрын
Completed lecture
@Saddam-gg7gj
@Saddam-gg7gj 2 ай бұрын
Plzz upload videos daily
@KunalVats-v3f
@KunalVats-v3f 2 ай бұрын
The best series
@bigbrain7933
@bigbrain7933 Ай бұрын
bhai question thaa tune pairsum or majority element khud se soch liya tha
@anishalam9648
@anishalam9648 2 ай бұрын
done dona done london mam bhot bahot shukriya apka mam
@diyadodiya6026
@diyadodiya6026 Ай бұрын
thank you didi
@DIBYENDU_MALLICK
@DIBYENDU_MALLICK 2 ай бұрын
Lecture 11 complete ✅ 27/09/24
@Y2k_Y2K38_Technology
@Y2k_Y2K38_Technology 2 ай бұрын
Hello 😁 vector is very fast library 👍👍👍
@girdharisinghyadav
@girdharisinghyadav 2 ай бұрын
thank you Shradha Didi 🥰🥰\\ I complete Lecture 11 Date /17/09/2024
@cargammer01
@cargammer01 2 ай бұрын
love you from nepal
@abhishekkumarraj6199
@abhishekkumarraj6199 2 ай бұрын
Lecture 11 completed
@Govind_thakur99
@Govind_thakur99 2 ай бұрын
Attendance for Day 10
@Theclassicalplayground
@Theclassicalplayground 2 ай бұрын
I am first view of this lecture 😄😄😄
@HistoryofIslamicSultans0786
@HistoryofIslamicSultans0786 2 ай бұрын
Day 11 completed
@YashSharma-xk7pz
@YashSharma-xk7pz 2 ай бұрын
Present ma'am 🙋🏻‍♂️
@karthikthangadipelli
@karthikthangadipelli Ай бұрын
Thank you, mam
@gautamksharma
@gautamksharma 2 ай бұрын
Day 11 complete Plz provide note of lecture 😊😊😊
@ShivamJain001
@ShivamJain001 2 ай бұрын
Lecture 11 completed successfully on 17/09/2024🙂
@MANISHSINGH-qj5iu
@MANISHSINGH-qj5iu Ай бұрын
lecture completed
@PRASHANTSHRINGI
@PRASHANTSHRINGI 2 ай бұрын
All leacture are completed
@souravbhattacharya7927
@souravbhattacharya7927 2 ай бұрын
Day -11......................... complete....
@NamanSachdeva-s8x
@NamanSachdeva-s8x Ай бұрын
Lecture 11 completed
@-Puligantimahendar
@-Puligantimahendar 2 ай бұрын
please keep uploading
@NikhilYadav-q3h
@NikhilYadav-q3h 2 ай бұрын
done ma'am !
@txusiff
@txusiff 21 күн бұрын
Completed on 7th November, 2024
@mayankbhadoriya4432
@mayankbhadoriya4432 2 ай бұрын
Keep uploading
@i_Have2BrainCells
@i_Have2BrainCells 2 ай бұрын
PUT IT IN THE PLAYLIST, EDITOR WAKE UP
@cooldude239
@cooldude239 2 ай бұрын
Attendance ✅✅
Time & Space Complexity - DSA Series by Shradha Ma'am
1:25:41
Apna College
Рет қаралды 148 М.
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 21 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 99 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
How to study for College Exams ? Just do this for best GPA!
13:38
Apna College
Рет қаралды 1,4 МЛН
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
BROKE to CROREPATI in 2 Years🔥 | Ishan Sharma Story
20:39
Ishan Sharma
Рет қаралды 691 М.
DSA & ₹1.2 Crore Per Annum Jobs - The Truth? (No Offence)
12:22
CodeWithHarry
Рет қаралды 715 М.
Majority Element II | Brute-Better-Optimal
26:58
take U forward
Рет қаралды 200 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 103 М.
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 21 МЛН