Coding Challenge #65.1: Binary Search Tree

This multi-part coding challenge is part of the first week of my course: "Intelligence and Learning." Here I attempt to implement a classic data structure: The Binary Search Tree. Code: https://thecodingtrain.com/challenges/65-b... p5.js Web Editor Sketches: šŸ•¹ļø Binary Search Tree: https://editor.p5js.org/codingtrain/sketch... šŸ•¹ļø Visualizing a Binary Tree: https://editor.p5js.org/codingtrain/sketch... Other Parts of this Challenge: šŸ“ŗ Visualizing a Binary Tree:    • CodingĀ ChallengeĀ #65.2:Ā VisualizingĀ aĀ Bina...Ā Ā  šŸŽ„ Previous video:    • CodingĀ ChallengeĀ #64.1:Ā ForwardĀ KinematicsĀ Ā  šŸŽ„ Next video:    • CodingĀ ChallengeĀ #66:Ā JavaScriptĀ Countdown...Ā Ā  šŸŽ„ All videos:    • CodingĀ ChallengesĀ Ā  References: šŸ“• Intelligence and Learning (Spring 2017): https://github.com/shiffman/NOC-S17-2-Inte... šŸ“˜ Grokking Algorithms book: http://amzn.to/2mMCK7Z šŸ”“ Live Stream Archive #87.3:    • CodingĀ TrainĀ LiveĀ 87:Ā TimerĀ inĀ JavaScript,...Ā Ā  Related Coding Challenges: šŸš‚ #68 Breadth-First Search:    • CodingĀ ChallengeĀ #68:Ā Breadth-FirstĀ Search...Ā Ā  šŸš‚ #98 Quadtree:    • CodingĀ ChallengeĀ #98.1:Ā QuadtreeĀ -Ā PartĀ 1Ā Ā  Timestamps: 0:00 Introducing today's topic: Binary Trees 1:18 Why would you use a binary tree? 3:36 What is a data structure? 4:47 Nodes with children 8:27 Algorithm for how the tree is sorted 11:36 Node object 12:17 Tree object 12:39 Use prototype to add an addNode function 18:58 Use recursion to add nodes 20:42 Deal with the case when two values are equal 22:50 How do you traverse the tree? 25:00 What does it mean to visit a node? 27:39 Add random values 28:58 Add a function to search the tree 37:57 Conclusion and suggested variations Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound šŸš‚ Website: http://thecodingtrain.com/ šŸ‘¾ Share Your Creation! https://thecodingtrain.com/guides/passenge... 🚩 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:    • CodingĀ ChallengesĀ Ā  šŸŽ„ Intro to Programming:    • StartĀ learningĀ here!Ā Ā  šŸ”— 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-Con... This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtr... #binarysearchtree #datastructure #intelligenceandlearning #javascript #p5js

Coding Challenge #65.2: Visualizing a Binary Tree
ā–¶ļøŽ

Coding Challenge #65.2: Visualizing a Binary Tree

A* Pathfinding Algorithm (Coding Challenge 51 - Part 1)
ā–¶ļøŽ

A* Pathfinding Algorithm (Coding Challenge 51 - Part 1)

Coding Challenge #98.1: Quadtree - Part 1
ā–¶ļøŽ

Coding Challenge #98.1: Quadtree - Part 1

Avicii, Dua Lipa, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style - SUMMER DEEP HOUSE Mix
ā–¶ļøŽ

Avicii, Dua Lipa, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style - SUMMER DEEP HOUSE Mix

Avici, Alan Walker, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style šŸŒž Summer Mix #21
ā–¶ļøŽ

Avici, Alan Walker, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style šŸŒž Summer Mix #21

Brian Cox- The Fermi Paradox Will Change How You See The Universe
ā–¶ļøŽ

Brian Cox- The Fermi Paradox Will Change How You See The Universe

Trump Slaps Fiery Tariff on Canada & SAVE Act Takes Voting Cues from Olive Garden | The Daily Show
ā–¶ļøŽ

Trump Slaps Fiery Tariff on Canada & SAVE Act Takes Voting Cues from Olive Garden | The Daily Show

How HIV Started a Century Before Anyone Noticed
ā–¶ļøŽ

How HIV Started a Century Before Anyone Noticed

Reinventing Entropy | Compression is Intelligence Part 1
ā–¶ļøŽ

Reinventing Entropy | Compression is Intelligence Part 1

A Rookies Guide to Watches
ā–¶ļøŽ

A Rookies Guide to Watches

Last Lecture Series: ā€œHow to Win Without Crushing Your Soulā€ - Graham Weaver
ā–¶ļøŽ

Last Lecture Series: ā€œHow to Win Without Crushing Your Soulā€ - Graham Weaver

Stockfish, But It Loses 50 ELO Every Move
ā–¶ļøŽ

Stockfish, But It Loses 50 ELO Every Move

I Bought And Restored "Old" Technology To Prove The Economy Is Imploding
ā–¶ļøŽ

I Bought And Restored "Old" Technology To Prove The Economy Is Imploding

The Most Important Conversation in AI Right Now
ā–¶ļøŽ

The Most Important Conversation in AI Right Now

The Pyramids Were Easy To Build, Actually
ā–¶ļøŽ

The Pyramids Were Easy To Build, Actually

Coding Challenge #71: Minesweeper
ā–¶ļøŽ

Coding Challenge #71: Minesweeper

What's Under Your Feet in New York City?
ā–¶ļøŽ

What's Under Your Feet in New York City?

Understanding B-Trees: The Data Structure Behind Modern Databases
ā–¶ļøŽ

Understanding B-Trees: The Data Structure Behind Modern Databases

Playlist | ė‚˜ė§Œģ˜ ķ™ˆģ¹“ķŽ˜ģ—ģ„œ ģ—¬ģœ ė”­ź²Œ ģ¦źø°ėŠ” 감성 ģž¬ģ¦ˆ šŸ’š | ģ ė‹¹ķžˆ ģ‹ ė‚˜ėŠ” ė¦¬ė“¬ģ˜ 감성 ģž¬ģ¦ˆ | ģž‘ģ—…, 업묓, 공부 | Fresh Summer Jazz
ā–¶ļøŽ

Playlist | ė‚˜ė§Œģ˜ ķ™ˆģ¹“ķŽ˜ģ—ģ„œ ģ—¬ģœ ė”­ź²Œ ģ¦źø°ėŠ” 감성 ģž¬ģ¦ˆ šŸ’š | ģ ė‹¹ķžˆ ģ‹ ė‚˜ėŠ” ė¦¬ė“¬ģ˜ 감성 ģž¬ģ¦ˆ | ģž‘ģ—…, 업묓, 공부 | Fresh Summer Jazz

How I program C
ā–¶ļøŽ

How I program C