BS-1. Binary Search Introduction | Real Life Example | Iterative | Recursive | Overflow Cases

  Рет қаралды 215,620

take U forward

take U forward

Күн бұрын

Problem Link: bit.ly/41Tk8ql
Notes/C++/Java/Python codes: takeuforward.org/data-structu...
Full Course: bit.ly/tufA2ZYt
You can follow me across social media, all my handles are below:
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
0:00 Introduction
1:27 Real Life Example
5:18 Coding Problem Example
13:22 Iterative Binary Search Code
17:15 Recursive Binary Search Code
26:18 Time Complexity Analysis
29:12 Overflow Case
32:46 Outro

Пікірлер: 244
@takeUforward
@takeUforward Жыл бұрын
Please comment understood and give us a like if you got everything :)
@sabyasachibiswal7790
@sabyasachibiswal7790 Жыл бұрын
Sir if possible can you please make a series on sliding windows ,2 pointers after this
@sabyasachibiswal7790
@sabyasachibiswal7790 Жыл бұрын
Salute to your dedication sir
@Demodulator7
@Demodulator7 Жыл бұрын
​@@sabyasachibiswal7790 as he is following the a2z sheet so i think next will be on string. Sliding window is on step 10 so it will take time i think.
@dhruvsharma9230
@dhruvsharma9230 Жыл бұрын
now 2023 c++ , pls dont skip java , again saying refactor entire sries java , tell me bench how many projects u get C++
@dhruvsharma9230
@dhruvsharma9230 Жыл бұрын
all people now doing dsa java foregt C++ in next 2 years recession
@shubhamagarwal1434
@shubhamagarwal1434 6 сағат бұрын
#Free Education For All.. # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this...."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India.
@playtune9217
@playtune9217 10 ай бұрын
This guy does amazing work. If I can grasp it, anyone can follow this playlist. thanks man.
@CodePinaka
@CodePinaka Жыл бұрын
"Raj" may be not in dictionary, but one thing is sure that "Raj" is in our heart :)
@jaswinders2670
@jaswinders2670 4 ай бұрын
☺☺
@Slice32gaming
@Slice32gaming 10 ай бұрын
bhoat sahi bro masta kaam kar raha hai tu .jo loag course afford nahi kar shakte unko free maine sikha raha .India need people like you
@utkarshshrivastava2632
@utkarshshrivastava2632 Жыл бұрын
Loved the way how you always keep your promise and deliver premium quality content ! Hats off to the dedication man❤❤❤❤
@harshith1424
@harshith1424 Жыл бұрын
Bro dropped whole" binary search" album overnight 😂😂😂
@emtiazahmed5333
@emtiazahmed5333 Жыл бұрын
😂😂😂😂 sahi bola..bhaiya is on fire😂
@takeUforward
@takeUforward Жыл бұрын
Sorry pura nai ho paaya as website ka kaam chal raha tha, pura aa jaega 5/6 din me
@roshanraturi1040
@roshanraturi1040 Жыл бұрын
​​@@takeUforward bhya aap itna v kr rhe houtna hi bhoot h ❤
@surajpadihar5027
@surajpadihar5027 Жыл бұрын
Bcz he promised and he never forget his promises that why we love him ❤
@harshith1424
@harshith1424 Жыл бұрын
@@takeUforward arey bhai mai tho mazak kar Raha tha ....u r doing next level hardwork for students.... always thankful to you🙏
@vikasbagri1225
@vikasbagri1225 Жыл бұрын
Understood it very well And the OVERFLOW part was awesome Keep up the good work Striver Although you have promised us 30+ videos but no worries as we know how busy you are Once again thanks for this amazing series
@nilesh69420
@nilesh69420 4 ай бұрын
26:03 Just a small correction at line 6. It should be mid - 1 instead of high - 1. I checked in striver's website and it is correct there. Also, Excellent explanation as always.
@Harsh06g
@Harsh06g Жыл бұрын
Hats OFF to you bhaiyaa for providing us with much of premium quality content( Don't have words to say for your efforts) Thank you so much
@cinime
@cinime Жыл бұрын
Understood! Amazing explanation as always, thank you very very much for your effort!!
@rajeshkumarsahoo1257
@rajeshkumarsahoo1257 Жыл бұрын
Hats OFF to you Man.Thanks for gifting us an Amazing Playlist Like DP.❤❤❤❤❤❤
@user-cx4mh7sc2j
@user-cx4mh7sc2j 8 ай бұрын
Thank you so much for this wonderful video session and this is the first time i have clearly understood about the concept and it is very clear. Thank you
@priyankarai7917
@priyankarai7917 Жыл бұрын
Amazing explaination sir ...first time i watch your video ...clear the binary search..
@rishabh1S
@rishabh1S Жыл бұрын
Wow the best explaination!! Thanks Striver.
@bhumithakur9967
@bhumithakur9967 10 ай бұрын
Striver the way you teach is exceptional 👏 .
@CodeMode9313
@CodeMode9313 Жыл бұрын
Understood .... thank u so much bhaiya ...its the best i have ever seen ...salaam rocky bhai
@user-ie3lx2zc2n
@user-ie3lx2zc2n Жыл бұрын
maja aagaya bhaiya wait kar rahe the bahut din se
@user-yl4cs3qe6r
@user-yl4cs3qe6r 11 ай бұрын
Hats OFF to you Man for making such Content
@NandakishorGudala
@NandakishorGudala 10 ай бұрын
understood i was new to lb, ub floor ,ceil ,i learnt them here .Thanks
@tanishkarawat5266
@tanishkarawat5266 Жыл бұрын
Striver bhaiya ka dedication!!!!! Thanks a lot
@rajatyadav3949
@rajatyadav3949 Жыл бұрын
great BS Content i had watched all conceptual Dout's are clear!!
@tanya8353
@tanya8353 7 ай бұрын
Your dedication is commendable Striver!!! Great job dude!!
@user-ot1rd8hd3d
@user-ot1rd8hd3d Жыл бұрын
Understood it very well THANK YOU SO MUCH SIR
@johndurai2226
@johndurai2226 Жыл бұрын
striver you are very loyal person because you told this video will be post jun 1st .Thank you for the Video for us. Keep doing .
@nopecharon
@nopecharon Жыл бұрын
Thank you striver for the amazing videos.
@suryasaipalthi
@suryasaipalthi 2 ай бұрын
Understood. Crystal clear.
@ritikarora108
@ritikarora108 6 ай бұрын
There was a mistake in your recursive code while submitting on Coding Ninjas, in the else statement you have written bs(nums,low,high-1,target) instead of bs(nums,low,mid-1,target), so it won't be O(logn) time complexity.
@AbhinavPundhir
@AbhinavPundhir Жыл бұрын
Thanks bhaiya for all the hard work that you have put, now I am going to watch it😁
@hareshnayak7302
@hareshnayak7302 4 ай бұрын
Understood, thanks striver for this amazing video. Really enjoing your lecture videos.
@sujalGhorse-xh8bs
@sujalGhorse-xh8bs 4 ай бұрын
Why sound is not there?
@peanutcoder9361
@peanutcoder9361 7 күн бұрын
One of the best lecture for binary search
@jappanjotsingh9465
@jappanjotsingh9465 10 ай бұрын
LOVED ITACHI NOTEBOOK :)
@ritikmalviya2580
@ritikmalviya2580 Жыл бұрын
Thanks bhaiya bhot time se intezar tha ❤❤❤
@user-rf7ri9pw9p
@user-rf7ri9pw9p Жыл бұрын
Thankyou thank you was waiting for this eagerly.
@sabyasachibiswal7790
@sabyasachibiswal7790 Жыл бұрын
Salute to your dedication
@pulkitjain5159
@pulkitjain5159 Жыл бұрын
Waiting for the solution of Minimizing the maximum distance to gas station. Amazing series and thanks for the signIn / signUp functionality on the site really solved my problem
@shashipreetham5575
@shashipreetham5575 Жыл бұрын
Salute for ur dedication...
@div0826
@div0826 2 ай бұрын
You are just amazing. Please keep this good work going
@user-ke7fs7ds6h
@user-ke7fs7ds6h 7 ай бұрын
awesome videos, best dsa videos ever
@RaviKumar-sn6tu
@RaviKumar-sn6tu 4 ай бұрын
crystal clear explaination✨✨✨✨
@nehathakur40
@nehathakur40 Жыл бұрын
Well explained!
@TheNStranger
@TheNStranger 4 ай бұрын
that's a great job bro. i like your every video after watching and submit question on leetcode😊😊 .
@sridharshree3034
@sridharshree3034 6 ай бұрын
Awesome thank You Vikram
@aakashsharma780
@aakashsharma780 Жыл бұрын
Thanks you Striver bhaiya You made it 🙌🙌 🎉
@Manishgupta200
@Manishgupta200 Жыл бұрын
Good understanding with TC
@sarangkumarsingh7901
@sarangkumarsingh7901 3 ай бұрын
Awesome bhaiya.................
@shrad6611
@shrad6611 8 ай бұрын
great playlist
@niteshshrivastav5424
@niteshshrivastav5424 Жыл бұрын
amazing bhaiya...
@NazeerBashaShaik
@NazeerBashaShaik 4 ай бұрын
Understood, thank you.
@Raj-pi1pl
@Raj-pi1pl Жыл бұрын
Finally worth waiting
@raZer.7_
@raZer.7_ 4 ай бұрын
Great video❤
@infernogamer52
@infernogamer52 Жыл бұрын
Understood Bhaiya!
@kingbadshah452
@kingbadshah452 6 ай бұрын
understood everything thanks striver
@dpxy1599
@dpxy1599 10 ай бұрын
example was excellent.
@kavyasree9760
@kavyasree9760 Жыл бұрын
you are amazing..........
@selene8721
@selene8721 3 ай бұрын
Thank you so much!!
@coderhumai
@coderhumai Жыл бұрын
Thank you❤❤
@dayashankarlakhotia4943
@dayashankarlakhotia4943 Жыл бұрын
Good explanation
@uno_u
@uno_u Жыл бұрын
Thank you so much :)
@_hulk748
@_hulk748 7 ай бұрын
Understood Sir🙇‍♂🙏✨💖
@harshverm776
@harshverm776 7 ай бұрын
Thank you !!!
@DeboleenaMukherjeeM23CSA008
@DeboleenaMukherjeeM23CSA008 12 күн бұрын
Thank you Striver😇
@deepanshutibrewal386
@deepanshutibrewal386 Жыл бұрын
Please give us Sliding Window Playlist . It is very very important and it is not available anywhere.
@CodeMode9313
@CodeMode9313 Жыл бұрын
u can also see for the aditya verma for sliding window ...its also good
@harshdiwase1941
@harshdiwase1941 6 ай бұрын
very good lecture
@vanshull
@vanshull Жыл бұрын
Understood ❤
@user-lr1xb1nu1q
@user-lr1xb1nu1q 8 ай бұрын
Please @takeuforward Make such more playlist on every topic please
@abhishekjha9284
@abhishekjha9284 Жыл бұрын
striver bhaiya Always on fire🔥🔥🔥🔥🔥🔥
@YourCodeVerse
@YourCodeVerse 7 ай бұрын
Understood✅🔥🔥
@soumiyamuthuraj3516
@soumiyamuthuraj3516 Ай бұрын
Awesome
@Ayeshasingh720
@Ayeshasingh720 Ай бұрын
thank u so much
@shaurya2608
@shaurya2608 Жыл бұрын
I completed the Binary search questions on my own, but I'm having a lot of trouble with the String problems.
@saileela3
@saileela3 8 ай бұрын
Thank You
@user-is6ky7pp2n
@user-is6ky7pp2n 2 ай бұрын
Understood !! 😎😎
@Rahul_NIT_JAIPUR
@Rahul_NIT_JAIPUR 11 ай бұрын
thank you so much bhaiya
@saritakumari4787
@saritakumari4787 11 ай бұрын
@takeUforward Hi Raj, shouldn't we also add a condition to check if arr[low] or arr[high] is equal to target. just to save some iterations or stack calls, i know the time complexity would still be log n, but is it advisable to add such optimizations or not ?
@user-zy4hl5pi7q
@user-zy4hl5pi7q 18 күн бұрын
outstanding
@bhavya8608
@bhavya8608 Жыл бұрын
understood!!
@Hipfire786
@Hipfire786 3 ай бұрын
understood everything
@mrnobody4365
@mrnobody4365 3 ай бұрын
understood!
@StellarStream9154
@StellarStream9154 Жыл бұрын
understood🤩
@sibiranganath
@sibiranganath 5 ай бұрын
Underdstood
@komalkrishna7836
@komalkrishna7836 Жыл бұрын
Wow 😍 great explanation Striver 👏
@ashishpradhan6250
@ashishpradhan6250 2 ай бұрын
God level🛐
@tukaramgaikwad1012
@tukaramgaikwad1012 4 күн бұрын
Understood😀
@abhaymandal4903
@abhaymandal4903 11 ай бұрын
First i like button , then i watch ❤
@AbhishekKumar-cv1dh
@AbhishekKumar-cv1dh 10 ай бұрын
Understood!!!
@growmoreyt4192
@growmoreyt4192 Жыл бұрын
completed first vide.
@himanshukaushik9223
@himanshukaushik9223 Жыл бұрын
Thanks bhaiya
@RumanaIslam-xs9rw
@RumanaIslam-xs9rw Ай бұрын
This is the best Binary Search explanation I have ever come across, Love from a lost cs soul
@harshitjaiswal9439
@harshitjaiswal9439 7 ай бұрын
Understood!
@apratimghosh5707
@apratimghosh5707 10 ай бұрын
bruhh you're goated🐐
@anuragsingh8910
@anuragsingh8910 Жыл бұрын
0:00 Introduction 1:27 Real Life Example 5:18 Coding Problem Example 13:22 Iterative Binary Search Code 17:15 Recursive Binary Search Code 26:18 Time Complexity Analysis 29:12 Overflow Case 32:46 Outro
@takeUforward
@takeUforward Жыл бұрын
Thank you so much
@anuragsingh8910
@anuragsingh8910 Жыл бұрын
@@takeUforward Welcome ❤
@iWontFakeIt
@iWontFakeIt Жыл бұрын
​@@takeUforward completed same day
@sujitrishikumar8621
@sujitrishikumar8621 10 ай бұрын
@@takeUforward bhaiya ek question hai ......at the end of video aapne kaha ...INT MAX + INT MAX ...which is 2*INT MAX.......bhaiya kya yeh kisi variable me store hoga...then divide by 2 hoga........ agr aisa hoga tabhi na bhaiya overflow condition aayega....isem thora sa confusion hai bhaiya...please clear kar dijiye na bhaiya
@IT___AbhayGupta
@IT___AbhayGupta 7 ай бұрын
​@@sujitrishikumar8621INT MAX + INT MAX .... Which is 2*INT MAX , dono variable int type ke hai to int hi output aayega esa compiler samjhta hai, and int type ka memory block provide krta hai output store ke liye, but jb two int max ko add krege to vo int memory block mai store nhi ho payega jisse overflow condition aayegi , And variable mai store nhi ho raha hai , jb program ram mai aata hai run krne ke liye tabhi program ko memory milti hai , kitni memory lgne wali hai program ko or kaha lgne wali hai ye compile time pr decide ho jata hai
@nayankhuman1043
@nayankhuman1043 27 күн бұрын
Understood :)
@mrsttechno5974
@mrsttechno5974 10 ай бұрын
understand😍💪
@utsavseth6573
@utsavseth6573 Жыл бұрын
Understood.
@dakshkriplani2935
@dakshkriplani2935 6 ай бұрын
thanks
@ABHISingh-yn9wx
@ABHISingh-yn9wx Жыл бұрын
thanks bhaiya ,, but i also need your suggestion on how to make our CV for placements and projects which will help us . i have 2-3 months what should i do from now onn
@per.seus._
@per.seus._ Жыл бұрын
UNDERSTOOD
@PRALAY.THAKUR
@PRALAY.THAKUR Жыл бұрын
great
D3 LiXiang L6 Машина Года 2025?
15:14
smotraTV
Рет қаралды 98 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 27 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 12 МЛН
Launching the best DSA Course + Platform
36:29
take U forward
Рет қаралды 95 М.
Day 125 Of Doing Codeforces Everyday Until I Reach Expert
1:10:20
Binary Search Algorithm - Computerphile
18:34
Computerphile
Рет қаралды 158 М.
Атака ВСУ на Курскую область: что происходит?
24:16
BBC News - Русская служба
Рет қаралды 859 М.
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
BS-4. Search Element in Rotated Sorted Array - I
16:38
take U forward
Рет қаралды 225 М.
BS-18. Allocate Books or Book Allocation | Hard Binary Search
27:29
take U forward
Рет қаралды 144 М.
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 27 МЛН