Coding Challenge #68: Breadth-First Search Part 2
In this two part challenge, I implement the Breadth-First Search algorithm in JavaScript. My demo application is "6 Degrees of Kevin Bacon" (finding the closest relationship between Kevin Bacon and another actor). Code: https://thecodingtrain.com/challenges/68-breadth-first-search
๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/0_6EV76Qy
Other Parts of this Challenge:
๐บ Breadth-First Search Part 1: https://youtu.be/piBq7VD0ZSo
๐ฅ Previous video: https://youtu.be/IIrC5Qcb2G4?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Next video: https://youtu.be/flxOkx0yLrY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
๐ The Nature of Code Part 2 (Spring 2017) - Intelligence and Learning: https://github.com/shiffman/NOC-S17-2-Intelligence-Learning
๐ Nature of Code: https://github.com/nature-of-code/noc-book-2
๐ฅ The Oracle of Bacon: http://oracleofbacon.org/
๐ Breadth-First Search on Wikipedia: https://en.wikipedia.org/wiki/Breadth-first_search
๐ Grokking Algorithms: https://www.manning.com/books/grokking-algorithms
Videos:
๐ My Video on Associative Arrays: https://youtu.be/_5jdE6RKxVk
๐ My Video on Prototypes: https://www.youtube.com/watch?v=hS_WqkyUah8
๐ด Coding Train Live 88: https://youtu.be/YUlJAu1j_UM?t=5553s
Related Coding Challenges:
๐ #65 Binary Tree: https://youtu.be/ZNH0MuQ51m4
๐ #98 Quadtree: https://youtu.be/OJxEcs0w_kE
Timestamps:
0:00 Continuation of Breadth First Search
2:31 Add end and start node to graph object
4:35 Queue data structure
6:53 Write the code for the breadth first search algorithm
13:37 Find the path
16:59 Create a dropdown
20:04 Add reset function
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
๐ Website: http://thecodingtrain.com/
๐พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
๐ฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
๐ก GitHub: https://github.com/CodingTrain
๐ฌ Discord: https://thecodingtrain.com/discord
๐ Membership: http://youtube.com/thecodingtrain/join
๐ Store: https://standard.tv/codingtrain
๐๏ธ Twitter: https://twitter.com/thecodingtrain
๐ธ Instagram: https://www.instagram.com/the.coding.train/
๐ฅ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
๐ p5.js: https://p5js.org
๐ p5.js Web Editor: https://editor.p5js.org/
๐ Processing: https://processing.org
๐ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#breadthfirstsearchalgorithm #sixdegreesofkevinbacon #javascript #p5js