Breadth First Search (BFS): Visualized and Explained

  Рет қаралды 221,774

Reducible

Reducible

Күн бұрын

Пікірлер: 160
@Reducible
@Reducible 4 жыл бұрын
Hey everyone, quick channel update: this channel recently hit 1K subscribers! Thank you all for your support and kind comments on all my videos. I got a lot of ideas for interesting content in future videos so stay tuned (hit that subscribe button)! As always, thanks for watching!
@blatanthamma6624
@blatanthamma6624 3 жыл бұрын
really good content, would you consider making a video about A* algorithm and topological sort, also maybe some data structure like red/black tree, segment tree, I'd be watching them!
@kasyapdharanikota8570
@kasyapdharanikota8570 3 жыл бұрын
Please make more videos ,really great channel and content
@wokguysrandomstuff5535
@wokguysrandomstuff5535 3 жыл бұрын
What? 6 month ago you had only 1k subs? Unbelievable
@ultramasculine
@ultramasculine 3 жыл бұрын
please, do more videos. it's much more interestring than reading books
@susantabasak1327
@susantabasak1327 3 жыл бұрын
We certainly need more videos from you on the topic (GRAPH)
@masonbiddle6750
@masonbiddle6750 4 жыл бұрын
Love the 3blue1brown vibes. This is the best way to learn for me and you do a great job explaining everything.
@andrewprahst2529
@andrewprahst2529 3 жыл бұрын
Nice profile picture. I do wonder what the software is though
@Mayank-mf7xr
@Mayank-mf7xr 2 жыл бұрын
He is the 3b1b of Computer Science.
@saivol6462
@saivol6462 Жыл бұрын
heyyy a 3blue1brown fan.. hard to come by
@ParthPaTeL-wm3kt
@ParthPaTeL-wm3kt 11 ай бұрын
@@andrewprahst2529 The animation is made through python manim library created by 3b1b
@jackiezibub5150
@jackiezibub5150 14 күн бұрын
@@andrewprahst2529 if its what 3blue1brown uses its called manim
@udaraabeyrathne7167
@udaraabeyrathne7167 2 жыл бұрын
I must say, this is one of the most effectively explained videos for DS & Alogs. Even though video is around 10.40 minutes, it's well ordered, planed and well explained to the point. Recommend this channel to anybody, who is looking for a quick but more elaborated explanations on Data Structures and Algorithms.
@maxwellhunt3732
@maxwellhunt3732 4 жыл бұрын
This is amazing content! I'm a high school student who loves computer science, and this is just amazing. I know a lot of effort must have gone into these videos (what with having to learn manim and everything), I hope you continue into the future
@Reducible
@Reducible 4 жыл бұрын
Thanks for the awesome comment! And yeah, these videos do take a lot of time and effort, but it's a lot of fun for me so I plan on continuing for the foreseeable future!
@AkshatSinghania
@AkshatSinghania 2 жыл бұрын
Same , do you do competitive programming too?
@maxwellhunt3732
@maxwellhunt3732 2 жыл бұрын
@@AkshatSinghania yep!
@jarmanbrar4114
@jarmanbrar4114 4 жыл бұрын
Another highly polished video. You deserve so much more subscribers (sickening to see only 1k subscribers for such high quaility content). You are 3Blue1Brown of computer science for me and hopefully you get millions of subscribers like him.
@xaceffulgent
@xaceffulgent Жыл бұрын
I finally understand BFS!! THANK YOU SO MUCH. That ball and string intuition piece made my mouth drop. And I finally truly understand a flooding algorithm - how why and when to use it. THANK YOU!!
@srujanjoshi3780
@srujanjoshi3780 3 жыл бұрын
The ball and string analogy alone was enough to get me to like the video :D
@yixe2253
@yixe2253 4 жыл бұрын
this is amazing, thank you for making them. These videos are timeless, people will be coming back to them in 2 years
@Reducible
@Reducible 4 жыл бұрын
Glad you enjoyed it -- thanks for the awesome comment.
@filipm133
@filipm133 Жыл бұрын
@@Reducible he was right, great content
@wlockuz4467
@wlockuz4467 2 жыл бұрын
Your graph theory series is amazing, I wish there was more to this series with more advanced topics! only thing I would like to point out is that you can mark vertexes as visited right after pushing them to stack/queue, Because you can be certain that if a vertex is in the stack/queue it is waiting to be visited , this avoids unnecessary insert/remove operations on stack/queue.
@MattCM89
@MattCM89 9 ай бұрын
Hands down best vidoe on youtube for learning this!
@hamzakhalid4311
@hamzakhalid4311 4 жыл бұрын
I wish if you were my DSA lecturer, just came across you channel I wish if i knew your channel a year ago. Keep making these high standard videos. Would love to see a whole series about Data Structures and Algorithms.
@hasnat_malik
@hasnat_malik 4 жыл бұрын
your way of teaching is absolutely amazing
@Reducible
@Reducible 4 жыл бұрын
Glad you enjoyed it!
@shanehowe2751
@shanehowe2751 2 жыл бұрын
Just want to say this is a fantastic explanation!! I am taking cs50ai and the first problem is the use BFS to find the shortest path between two actors and I just solved it thanks to this video
@aaroncroft7514
@aaroncroft7514 2 жыл бұрын
BEST CODING VIDEO I HAVE EVER WATCHED! So elegantly explained, thanks so much!!! 🙏🏻
@YuuhanngChau
@YuuhanngChau 2 жыл бұрын
I love the music, so relieving, make me concentrate on what you are talking about.
@manupratap6406
@manupratap6406 4 жыл бұрын
I am addicted to such content. Plz if someone else also creates such content pl tell. Ur videos make maths so beautiful. Hats off👏👏
@rtcwtwister
@rtcwtwister 4 жыл бұрын
The flood fill problem is a great example for the use of graph traversal algorithms! Definitly going to show it to my students.
@kyoungjunhan1098
@kyoungjunhan1098 2 жыл бұрын
@2:39 So so so so so so so helpful to actually have a visualized explanation of the implementation of the codes!! Thank you so much!! You are absolutely brilliant :)
@mandelbrot3162
@mandelbrot3162 4 жыл бұрын
Thankyou so much for this video!! This is awesome. Today my DS teacher gave me the same problem and voila! I got you.Thanks✌🏼, You cleared my confusion!
@sivsivsree
@sivsivsree 4 жыл бұрын
This channel is a gold mine!
@fredericoamigo
@fredericoamigo Ай бұрын
I’m such a fan of your work! I’d give this a million likes if I could. You are definitely making the world a better place! Keep up the great work! I truly appreciate it!
@thequantartist
@thequantartist 3 жыл бұрын
The quality of this channel is incredible. 3blue1brown level.
@okta25
@okta25 Ай бұрын
"Imagine you are pulling the ball up until all the strings tightened" simply Genius !
@rubamushtaq1657
@rubamushtaq1657 3 жыл бұрын
This problem seems like a building block to solve graph problems. Thank you for sharing this.
@thenriquevicentini
@thenriquevicentini 4 жыл бұрын
The work you are doing here is fantastic, hope all the best for you man, thanks a lot
@Jbdoster
@Jbdoster Жыл бұрын
Oh yeah This is definitely the one It’s been years since my undergrad and this helped me review thank you so much
@arekysa
@arekysa 3 жыл бұрын
This channel is so much underrated
@matiaslast2100
@matiaslast2100 4 жыл бұрын
this is awesome man! it has a clear explanation with pseudocode easy enough to understand and make an implementation thanks!!
@lefuturiste27
@lefuturiste27 3 жыл бұрын
lol that was python, great to do pseudocode I guess
@ahmedouerfelli4709
@ahmedouerfelli4709 4 жыл бұрын
You deserve much more subscribers.
@AshishKumar-xx3dx
@AshishKumar-xx3dx 3 жыл бұрын
Again an awesome explanation by Reducible
@kobic8
@kobic8 3 жыл бұрын
amazing!!! helped me a lot, as a junior that is just introduced to this topic
@alex19991014
@alex19991014 Жыл бұрын
Excellent explanation and example. Love it when you mention the real life example of the “Fill” button in Paint🎨 app, it gave me a instant picture of BFS.
@emre5740
@emre5740 3 жыл бұрын
That's a great efford! I wish I discovered this channel earlier. Thanks
@VladyYakovenko
@VladyYakovenko 2 жыл бұрын
I really do appreciate your graph theory videos they are really clear and I love the way you are making me think about the problems and solutions. Please make more videos about graph theory and maybe showing some examples of problems solved with graph theory
@navneet5084
@navneet5084 3 жыл бұрын
I might have been traversing the internet the DFS way, that's why I found your channel so late!
@orion2843
@orion2843 3 жыл бұрын
Amazing Content Sir,like no one else in Computer Science Domain. Really Appreciate you animation,background music and hardwork you put in every video❤️😁❤️
@liuculiu8366
@liuculiu8366 3 жыл бұрын
Such well organized content and finely polished presentation. Instantly subscribed. Appreciate the effort!
@mayankmudgal1728
@mayankmudgal1728 2 жыл бұрын
Absolutely stunning! Love the animations and the intuitive vibe just like 3b1b;
@monickverma2944
@monickverma2944 3 жыл бұрын
this is the best. i beg u not to stop
@jamesmcgreivy2882
@jamesmcgreivy2882 4 жыл бұрын
Love these videos! Really interesting topics and they’re super easy to follow
@ParthVerma-kc1wr
@ParthVerma-kc1wr Жыл бұрын
This was so insanely good! Although I watched the video a few times. I could understand everything!!
@henrroo
@henrroo 2 жыл бұрын
Your explanation was so good, thank you very much, keep doing these kind of videos bro!
@vikasviki7490
@vikasviki7490 4 жыл бұрын
Awesome Content, Please add more such videos, Graph and DP would be Awesome.
@dnm9931
@dnm9931 Жыл бұрын
Beautiful and clear explanation! Thank you so much!
@sufalt123
@sufalt123 21 күн бұрын
flood fill problem reminded me about strongly connected components on graphs
@yatharthmishra01
@yatharthmishra01 2 жыл бұрын
Beautifully explained ! Keep up the good work.
@alexbrodbelt297
@alexbrodbelt297 3 жыл бұрын
This is incredible, I cannot thank you enough!
@dipankarkumarsingh
@dipankarkumarsingh 3 жыл бұрын
Please please please keep uploading videos ... they are soooooooo good .....
@daemitrious
@daemitrious 8 күн бұрын
For those not very adept with Python, it may be difficult to understand your 'neighbors' implementation at 9:40. I know you probably wanted to keep everything in one slide, but it may have been better to expand the list comprehension in 'neighbors' so that it's more verbose and easier to read. Other than that, this video was fantastic and the color scheme you used was awesome thank you for the hard work.
@user-wc1sm8cj8s
@user-wc1sm8cj8s 3 жыл бұрын
really great contents, I really understand a lot from your videos! *Keep it up*
@robtito2009
@robtito2009 3 жыл бұрын
You guys deserve so much more subscribers
@marioprado8789
@marioprado8789 Жыл бұрын
That level explanation. Awesome!
@AdityaMoza
@AdityaMoza Жыл бұрын
Absolutely amazing. Please make as many videos as you possibly can on graph theory. I'd buy a complete DSA course from you if you choose to make one.
@erv993
@erv993 3 жыл бұрын
Wow, that's a very cool explanation! I think I understand it much better now, thx!
@SomebodyYouUsedToSee
@SomebodyYouUsedToSee 3 жыл бұрын
Bro , You are just tooooooooooooo good , please make more algorithm videos
@lastshots300
@lastshots300 3 жыл бұрын
absolutely loving your content - great stuff
@mohdrasid6737
@mohdrasid6737 3 жыл бұрын
such a clear and detailed explanation 👏. Thank you 😇
@essamgouda1609
@essamgouda1609 2 жыл бұрын
KZbin is indeed full of gems.
@1mr12
@1mr12 6 ай бұрын
that was eazy, simple, adorable !
@SamTablet-z9t
@SamTablet-z9t 5 ай бұрын
thanks for clear explaining
@Lolwutdesu9000
@Lolwutdesu9000 Ай бұрын
This is an awesome video, but your neighbours function is flawed. You don't need to verify whether it connects to start. Think about it ;)
@yeah5037
@yeah5037 2 жыл бұрын
Very nice video, thank you!
@hasnat_malik
@hasnat_malik 4 жыл бұрын
man i'm new to the channel and am lovin it
@Speykious
@Speykious 3 жыл бұрын
I just watched this video after I intuitively found by myself an algorithm to capture a group of stones in a GO game setup
@petesantago5977
@petesantago5977 2 жыл бұрын
Excellent content - thank you.
@zhougood8998
@zhougood8998 4 жыл бұрын
it helps me a lot!!!
@saymatasnim5912
@saymatasnim5912 4 ай бұрын
Really can't thank you enough!
@rodrigomarchi9755
@rodrigomarchi9755 Ай бұрын
Great video!
@huseinjavidmehr1228
@huseinjavidmehr1228 2 жыл бұрын
was fluent explanation thank you
@carljustinemosquida4727
@carljustinemosquida4727 2 жыл бұрын
hope more graphs algos in the future
@BerArchegas
@BerArchegas 3 жыл бұрын
Amazing vid, amazing channel
@KumarDinesh-zw2vq
@KumarDinesh-zw2vq 6 ай бұрын
Wow man. Love you
@Saleh-le2zf
@Saleh-le2zf 3 жыл бұрын
I still love you man!
@brendawilliams8062
@brendawilliams8062 4 жыл бұрын
Thankyou.
@kautilyap9856
@kautilyap9856 4 жыл бұрын
Can you please develop a course comprising on data structures, algorithms and problem solving paradigms??
@Reducible
@Reducible 4 жыл бұрын
Or ... I could just make a course equivalent series of videos on KZbin for free :P
@kautilyap9856
@kautilyap9856 4 жыл бұрын
@@Reducible Yeah you can! That would be the best thing! But like can you do them simultaneously and in one video
@mohamedmoumni8916
@mohamedmoumni8916 2 жыл бұрын
great Job , Thanks A lot.
@tedarcher9120
@tedarcher9120 3 жыл бұрын
If you code in Python, never initialise a list as [something]*N, because it will create a list with N the same objects, which will break your program. Instead, use [False for _ in range(N)]
@brendawilliams8062
@brendawilliams8062 2 жыл бұрын
When you have shoe laces and need to tie them
@marco_gallone
@marco_gallone 3 жыл бұрын
I recognize that the only difference in the two algorithms (BFS vs DFS) is that BFS uses a queue vs DFS uses a stack. But you presented a really clean algorithm using recursion in DFS. Can BFS be reduced down to a recursive form too?
@Reducible
@Reducible 3 жыл бұрын
Well, it's always possible, but it really doesn't make sense to use recursion since DFS recursion is just using the call stack. Recursion implicitly uses a stack. BFS uses a queue which is basically the opposite of the stack so it really doesn't fit the recursive framework. See this for a more thorough discussion and some of the possible ways: stackoverflow.com/questions/2549541/performing-breadth-first-search-recursively
@godwinwabz5379
@godwinwabz5379 2 жыл бұрын
Hello.... Thanks for creating your content.. however, I realized that in your animation, while visiting vertex 3, you added 2 to the queue. However, 2 is adjacent to vertex 0, therefore, it would be visited at the same level with vertices 1, and 3. Therefore, adding it into the queue would result into revisiting of the vertex, which isn't efficient
@nihao852
@nihao852 7 ай бұрын
legend
@nontth5355
@nontth5355 3 жыл бұрын
i wish i watch this video before I build my minesweeper game if so I wouldn’t have a hard time figuring out flood fill on my own btw I think the isValid function can be write like this def isValid(img, row, col): return row in range(len(img)) and col in range(len(img[0])
@ullaskunder
@ullaskunder 3 жыл бұрын
Perfect
@andrewprahst2529
@andrewprahst2529 3 жыл бұрын
I'm just here because I really like lines and stuff
@joinrevolution
@joinrevolution 28 күн бұрын
OMG how did I find myself here? I was looking for funny dog videos
@TheStylestatement
@TheStylestatement 2 жыл бұрын
Best one
@riyadh5449
@riyadh5449 Жыл бұрын
Wow, how lovely you accent is😇.. damn to Hindi accent!
@michaelheuss6502
@michaelheuss6502 3 жыл бұрын
It's been a long time since I took algorithms, but I think we skipped BFS in general and went straight to Dijkstra's algorithm.
@rhaq426
@rhaq426 2 жыл бұрын
cool intro
@ananyapamde4514
@ananyapamde4514 4 жыл бұрын
Gold
@stevenperez5260
@stevenperez5260 2 жыл бұрын
I was wondering to know what software did you use for the graph animations?
@Battler-tbb
@Battler-tbb 7 ай бұрын
B - Boss F - Fighting S - Stages
@handlebred
@handlebred Жыл бұрын
very good vide;)
@justinrush6620
@justinrush6620 3 жыл бұрын
Curious why you didn't just use a min/max function with neighbors to avoid boundary issues? Wouldn't that be a simpler implementation?
@Memes_I_Stole_For_A_Living
@Memes_I_Stole_For_A_Living 2 ай бұрын
Is it possible to change queue = [(row, col] to queue = start?
@jackabrams5859
@jackabrams5859 3 жыл бұрын
thumbnail looks like the reverse transmutation circle from FMAB
@patriot925th
@patriot925th 7 ай бұрын
around 6:30, you said (row, col): (2,2). but it seems like (3,3). what am I missing here?
@davidequattrocchi5083
@davidequattrocchi5083 3 жыл бұрын
I've been using variants of this algorithm for years. I never thought I had invented it first... but knowing it for sure is still somewhat disappointing.
@nurhusni
@nurhusni 4 жыл бұрын
Is this channel related to 3blue1brown?
@Reducible
@Reducible 4 жыл бұрын
Directly, no. I love his work and I think his channel is one of the best educational channels out there. I use the same animation library he uses so I guess the content will have a similar style in that sense.
@asutoshghanto3419
@asutoshghanto3419 3 жыл бұрын
@@Reducible please can you make a documentation of manim? it is very difficult to work with it . Can you tell how do I label points marked on a 2d graph.
@gamerkaue88
@gamerkaue88 4 жыл бұрын
Here before 1k views.
Dijkstra's Algorithm - Computerphile
10:43
Computerphile
Рет қаралды 1,3 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 20 МЛН
DFS vs BFS, When to Use Which?
9:25
AlgoMonster
Рет қаралды 6 М.
The hidden beauty of the A* algorithm
19:22
Polylog
Рет қаралды 900 М.
Lecture 13: Breadth-First Search (BFS)
50:48
MIT OpenCourseWare
Рет қаралды 706 М.
Breadth First Search grid shortest path | Graph Theory
16:51
WilliamFiset
Рет қаралды 339 М.
Unboxing the Raspberry Pi CM5 Development Kit
11:36
Level 2 Jeff
Рет қаралды 17 М.
Lecture 14: Depth-First Search (DFS), Topological Sort
50:31
MIT OpenCourseWare
Рет қаралды 452 М.
Huffman Codes: An Information Theory Perspective
29:11
Reducible
Рет қаралды 236 М.
Depth First Search Algorithm | Graph Theory
10:20
WilliamFiset
Рет қаралды 482 М.
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН