Introduction to Binary Search (Data Structures & Algorithms #10)

  Рет қаралды 244,353

CS Dojo

CS Dojo

Күн бұрын

Here’s my introduction to the binary search algorithm.
Check out the practice problem from algoexpert.io/csdojo at 12:17.
You can find my Python and Java sample code at: www.csdojo.io/binary
Also join our community at: www.csdojo.io/community

Пікірлер: 282
@CSDojo
@CSDojo 3 жыл бұрын
If you’re already familiar with binary search, I’d recommend the practice problem I introduced at 12:17. It’s a nice problem from my business affiliate algoexpert.io/csdojo - from which you can get a discount with my referral code csdojo.
@Ali-mc4le
@Ali-mc4le 3 жыл бұрын
What is the blackboard app or tool you are using to show code examples? Looks great! I just joined algoexpert because of you :)
@htol78
@htol78 3 жыл бұрын
+1 what software do you use to create presentation? looks pretty good.
@bhagwandas321
@bhagwandas321 3 жыл бұрын
Hello dojo thank you
@ahammedafzal7797
@ahammedafzal7797 3 жыл бұрын
def search(arr, target): l = 0 r = len(arr)-1 while l arr[r] and target < arr[m]: r = m-1 else: l = m+1 return -1 right?
@tylerdurden4169
@tylerdurden4169 3 жыл бұрын
Continue this series of data structures.
@nx8221
@nx8221 3 жыл бұрын
would be great!
@lakshkaushik6366
@lakshkaushik6366 3 жыл бұрын
Check out apni kaksha for ds and algo
@acm1812
@acm1812 3 жыл бұрын
@@lakshkaushik6366 no
@prernacore
@prernacore 3 жыл бұрын
please continue this course. it's the best that I have ever stumbled upon. Been watching all the videos since morning and I am so grateful for these , cleared all the doubts and making basics easier and clear. Thank you!
@ctcrnitv
@ctcrnitv 3 жыл бұрын
You are such a good teacher. I already knew what binary search was but this was brilliantly explained, probably the clearest explanation I've ever seen.
@adibattie9619
@adibattie9619 2 жыл бұрын
It's not obvious how much binary search helps until you actually code it and time it yourself. It's actually amazing. Thanks for the informative videos!
@manuelelkess8259
@manuelelkess8259 3 жыл бұрын
This course of data structures and algorithms one of the best on the internet I really hope you continue it to the very end.
@TheNaderpop
@TheNaderpop 3 жыл бұрын
Man, how do I love your introduction to this series so much , I hope you finish this series as soon as possible.
@dreamofmirrorsguy7043
@dreamofmirrorsguy7043 Жыл бұрын
You are insanely the best pragmatic youtuber and teacher I've watched so far. Thank you very much for your content!
@Veigaburame
@Veigaburame 3 жыл бұрын
the way you seperate exercise into 10-15 minutes is pretty handy. I could spend time watching your video while having lunch. Love to see these kind of videos uploaded on KZbin. Thanks Dojo hehee
@asdfractal8115
@asdfractal8115 3 жыл бұрын
The way you explain the process of thinking about the problem is really good. While you are explaining the problem I can already imagine the code required to solve it. Your videos have helped me a lot to conceptualize solutions to my problems.. so thank you very much!
@dailycodingproblem8346
@dailycodingproblem8346 3 жыл бұрын
I’m 4 days away from turning 93 and CS Dojo inspired me to create my own tutorials. Thanks, CS Dojo!
@stevepriest5113
@stevepriest5113 3 жыл бұрын
Happy birthday
@shubhamiot326
@shubhamiot326 3 жыл бұрын
@@stevepriest5113 I advance
@Name-mi7bx
@Name-mi7bx 3 жыл бұрын
Fake, not the first time a simp Commented the same shit.
@Importunity
@Importunity 3 жыл бұрын
you did not sound like you were turning 93 in your video bruh
@williambasquez7607
@williambasquez7607 3 жыл бұрын
Back at it again with the good stuff 👨🏻‍💻💻
@mattoattacko
@mattoattacko 3 жыл бұрын
Heck yeah! You totally came through. Much appreciated mate!
@SarangDhanurdhari
@SarangDhanurdhari 3 жыл бұрын
Thanks a lot dojo. Please keep continuing this series.
@homealone8946
@homealone8946 3 жыл бұрын
Dojo, man this was a crystalclear explanation. Thank You very much.
@rajibdpi
@rajibdpi 3 жыл бұрын
Thank you so much for this great opportunity to Learn Dara structures and Algorithm with you.
@niquebon
@niquebon 2 жыл бұрын
THANK YOU! for saving me always. Your tutorials are easy to understand compared to others. Great teacher!
@frixaco
@frixaco 3 жыл бұрын
Reaaly great explanation! Thank you very much and continue these series!
@kR0N0Z618
@kR0N0Z618 3 жыл бұрын
these videos are a godsend. very well articulated! keep it up! i look forward to more videos in the series!
@HShravzP
@HShravzP 3 жыл бұрын
This is so helpful. Thankyou and please continue this series :)
@DjLeonSKennedy
@DjLeonSKennedy 3 жыл бұрын
5 years i couldn't understand about complexity until now! thanks
@lucyledezma709
@lucyledezma709 3 жыл бұрын
Hello CS Dojo!!!. I am so happy for the new video!!!
@cpbeatzx2263
@cpbeatzx2263 Жыл бұрын
This is no joke one of the best videos ive watched, I do not comment on youtube videos, but this deserves one. Thank you
@maddada
@maddada 3 жыл бұрын
Very clear explanation, thank you very much! Please keep them coming
@ionutilies3137
@ionutilies3137 3 жыл бұрын
Great video with a lot of information. Thank you for all!
@maulanaputro1966
@maulanaputro1966 3 жыл бұрын
Really looking forward to your next videos in this series!
@lysekthe
@lysekthe 3 жыл бұрын
I applied this algorithm in my work, thank you!!!
@arjunthecoder
@arjunthecoder 3 жыл бұрын
Love this video. Great Refresher!!!
@TheMatias2
@TheMatias2 3 жыл бұрын
Best explanation I found on YT! thanks!
@samuraijack5919
@samuraijack5919 3 жыл бұрын
I'm not gonna lie, it is still hard to wrap my head around some of this stuff like time complexity and Big O. Thank you for all that you do!
@sashamuller9743
@sashamuller9743 3 жыл бұрын
same bro same
@plor1261
@plor1261 3 жыл бұрын
Great teaching and it was very fun to learn!
@huckleberryfinn8795
@huckleberryfinn8795 Жыл бұрын
The best programming lessons on KZbin!!
@iamakifislam
@iamakifislam 3 жыл бұрын
Thanks. I was waiting for this video ! Please continue DS and Algo Series
@anuragd398
@anuragd398 3 жыл бұрын
Back at it again with the good stuff YK
@DatascienceConcepts
@DatascienceConcepts 3 жыл бұрын
Nice explanation! Searching Algorithms are super interesting and important :)
@SourLemonFan
@SourLemonFan 3 жыл бұрын
Thanks for your help! These videos are amazing!
@udoyonb274
@udoyonb274 3 жыл бұрын
This is brilliant! Thank you so much!
@rakotonirinaolvanotjeancla1990
@rakotonirinaolvanotjeancla1990 3 жыл бұрын
i am very very very happy to see you again. you are the best for explaination
@akashk__6894
@akashk__6894 3 жыл бұрын
Your videos are really helpful ! continue your good work .
@feding3328
@feding3328 3 жыл бұрын
Thank you so much CS Dojo
@sriramkasu7511
@sriramkasu7511 3 жыл бұрын
Finally he is back with this series
@BoopeaTech
@BoopeaTech Жыл бұрын
You're great. The explanations are really broken down. Thank you👍
@jahanvi9429
@jahanvi9429 3 жыл бұрын
You are my saviour!!!!! thank you so much. i was having so much trouble with this
@nguyenlethuong186
@nguyenlethuong186 3 жыл бұрын
I like your explanations and I'd love if u make more videos like this
@KevinGarcia-ws1kt
@KevinGarcia-ws1kt Жыл бұрын
Thank you for this video. That was a really clear explanation
@diveshkosuri5594
@diveshkosuri5594 2 жыл бұрын
You just made it so simple! Thanks
@Devakvp
@Devakvp 2 жыл бұрын
Clean explanation! Thank you so much!
@saiint9991
@saiint9991 3 жыл бұрын
Good stuff❤... Continue all concepts related to data structures.
@azatecas
@azatecas 3 жыл бұрын
this is a great refresher!
@p_square
@p_square 3 жыл бұрын
Legend back again!!
@kuberchaurasiya
@kuberchaurasiya 3 жыл бұрын
Thanks. The sorted rotated array problem is very interesting
@JMBTV1988
@JMBTV1988 3 жыл бұрын
Wow.. thank you for this tutorial. I badly needed this one
@JGyanRaj
@JGyanRaj 3 жыл бұрын
Thanks a lot for such a great video... Well explained easily understandable
@shokhrukhbekyursunjonov6203
@shokhrukhbekyursunjonov6203 3 жыл бұрын
That's so cool, learned a lot. I, myself, for example solved it like following: def search(arr,target): if target in arr: for i in arr: if arr[i]==target: return i print(search([1,2,3,11],11)) output: 3
@shubhamiot326
@shubhamiot326 3 жыл бұрын
Keep on making videos... Salute from india
@trongdoan817
@trongdoan817 3 жыл бұрын
super clear instruction. Thank you.
@proggaparomita281
@proggaparomita281 Жыл бұрын
KZbinrs I owe my whole degree: CS Dojo, Code with Harry and Organic Chemistry Tutor .
@valacascrane9156
@valacascrane9156 3 жыл бұрын
You are quite an inspiring guy. Keep on!
@spacewitch9987
@spacewitch9987 2 жыл бұрын
your videos are so helpful, dude. tysm! ;u;
@nationhlohlomi9333
@nationhlohlomi9333 Жыл бұрын
Great video as always
@aznguyener
@aznguyener 3 жыл бұрын
nice series! please continue
@parthokr
@parthokr 3 жыл бұрын
Quality content as always.
@shreya1201
@shreya1201 3 жыл бұрын
such a good explanation!
@elmehdimedrani1240
@elmehdimedrani1240 3 жыл бұрын
Thank you for sharing this content!
@user-vv9lz2ik2t
@user-vv9lz2ik2t 2 жыл бұрын
Great explanation thanks
@selvalakshmis.v4232
@selvalakshmis.v4232 3 жыл бұрын
Fantastic video Thank you
@masqueradeee
@masqueradeee 3 жыл бұрын
Thank you so much great explanation 👍 pls upload more videos on Data structures.
@neevetiasli
@neevetiasli 6 ай бұрын
For the first time ever i really understood
@eduardomartinez6521
@eduardomartinez6521 3 жыл бұрын
Thanks for the lesson !. Do you have any video or resource where you list or describe the personal projects you did before you applied for Google?
@fazeefathima1041
@fazeefathima1041 3 жыл бұрын
Thanku so much sir, I am your subscriber from INDIA✌️😊
@haddonjames5829
@haddonjames5829 2 жыл бұрын
great explanation
@seftyyunitasari7623
@seftyyunitasari7623 2 жыл бұрын
Thank you so much, you helped me a lot!
@wisdomovermoney3394
@wisdomovermoney3394 3 жыл бұрын
You made it so simple.
@samsj1234
@samsj1234 3 жыл бұрын
You are back !!😊
@nandhakumaranm6006
@nandhakumaranm6006 3 жыл бұрын
Please continue the python series. Really waiting for more videos. I have started learning by watching your videos plz do teach more
@tylerxiao2656
@tylerxiao2656 3 жыл бұрын
My idea for shifted binary search: Copy the array once, so that an array like [3,1,2] becomes [3,1,2,3,1,2]. Next, we compute the maximum and minimum values of our original array, which are 3 and 1, respectively. Then, we run 2 pointers to find the indices of the range between the minimum and maximum, which in our example the indices are 1 and 3, and we binary search through those values.
@tylerxiao2656
@tylerxiao2656 3 жыл бұрын
Never mind, I watched the Errichto video on this. Rip I got this wrong
@josephjohn6927
@josephjohn6927 3 жыл бұрын
Thanks csdojo 😊
@erza4876
@erza4876 3 жыл бұрын
It would be great if you can share some experience in dealing with conditions in binary search templates, e.g., left < right or left
@mevanscodes
@mevanscodes Жыл бұрын
I know this is old but what software were you using to create this ? Awesome video by the way. I was having trouble understanding the pointer aspect on codecademy but seeing the visuals helped a lot
@feding3328
@feding3328 3 жыл бұрын
very good, i like this!
@anum2471
@anum2471 2 жыл бұрын
best lecture👌🏻
@airpods4
@airpods4 3 жыл бұрын
best explanation
@anuragd398
@anuragd398 3 жыл бұрын
I Love Your Chnnel So much
@kumaracademy7555
@kumaracademy7555 3 жыл бұрын
I am your student from India❤
@pranavm2539
@pranavm2539 3 жыл бұрын
Me too
@mokshanirugutti
@mokshanirugutti 3 жыл бұрын
Same
@vivekpatel5555
@vivekpatel5555 3 жыл бұрын
Me too
@khaledhafsaoui
@khaledhafsaoui 3 жыл бұрын
Thank you sirr👏👏👏
@dexteritylord1725
@dexteritylord1725 3 жыл бұрын
Thanks a lot for your effort. please make a tutorial on Merge sort algorithm + quick sort algorithm
@GhostVaibhav
@GhostVaibhav 3 жыл бұрын
Bro, increase the frequency of ur videos!! It will be of great help to everybody..!
@aaaronnicholas_2000
@aaaronnicholas_2000 3 жыл бұрын
Hey CJ you're videos are very good
@aaaronnicholas_2000
@aaaronnicholas_2000 3 жыл бұрын
Sorry CS
@michaelngogoyo2402
@michaelngogoyo2402 3 жыл бұрын
great content
@ameiragha2419
@ameiragha2419 3 жыл бұрын
I am really appreciate your effort CS Dojo. if it’s possible can you make next episode about hash table? Peace.
@nareshreddy3344
@nareshreddy3344 3 жыл бұрын
Please continue this series
@IkramIkram-gm3zg
@IkramIkram-gm3zg 3 жыл бұрын
do u please know how can we solve the problem given at the end ?
@sase1017
@sase1017 3 жыл бұрын
I think there is a mistake with last part of pointer movement when target = 12, when left pointer will be equal to right pointer, we will exit the while loop(Left = right) with return -1, left and right pointers will not pass over each other.
@mohammadalloush8636
@mohammadalloush8636 3 жыл бұрын
Welcome back.
@hmchemistry7883
@hmchemistry7883 3 жыл бұрын
Thanks CS Dojo. The practice problem was fun! public static int ShiftedBinarySearch(int[] array, int target){ int l=0, r=array.length-1, mid=0; while(larray[r]){ mid=(l+r)/2; if(array[mid]==target) return mid; else if(array[mid]array[mid] && target=array[l] && target
@EDS432
@EDS432 2 жыл бұрын
Nice Dojo
@saksh.j
@saksh.j 3 жыл бұрын
Hey dojo. I've recently started to get intrest in computers and coding - I'm an extreme beginner. So which video of yours i should watch or what basics should I start or begin with. Thank you
@omkarjoshi7371
@omkarjoshi7371 3 жыл бұрын
Hey CS DOJO really great videos of yours. i have important question for about Data structures and algorithms. Should we learn it in JS ? or i have to switch language such as c++ as most recommended in CP
@bhaskarkoley87
@bhaskarkoley87 3 жыл бұрын
I am an Arts graduate and currently working in Service based company. can I get job in product based company like Amazon or Google? If yes, how can I prepare for that?
@bishwasthapa1408
@bishwasthapa1408 3 жыл бұрын
Please continue 😍🙏
@anamika5984
@anamika5984 3 жыл бұрын
Bro please continue this stuff🙏
@raselahammed8830
@raselahammed8830 3 жыл бұрын
Thank you so much CS dojo ❤
Introduction to Trees (Data Structures & Algorithms #9)
10:30
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 12 МЛН
Final increíble 😱
00:39
Juan De Dios Pantoja 2
Рет қаралды 44 МЛН
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 40 МЛН
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 15 МЛН
Group Definition (expanded) - Abstract Algebra
11:15
Socratica
Рет қаралды 861 М.
Binary Search Animated
7:00
Dreams of Code
Рет қаралды 23 М.
Best Order to Learn Algorithms & Data Structures
1:00
NeetCodeIO
Рет қаралды 101 М.
Top 7 Data Structures for Interviews Explained SIMPLY
13:02
Codebagel
Рет қаралды 116 М.
The determinant | Chapter 6, Essence of linear algebra
10:03
3Blue1Brown
Рет қаралды 3,6 МЛН
Learn Binary Search in 10 minutes 🪓
10:04
Bro Code
Рет қаралды 100 М.
Top 6 Coding Interview Concepts (Data Structures & Algorithms)
10:51
2000000❤️⚽️#shorts #thankyou
00:20
あしざるFC
Рет қаралды 12 МЛН