Back to Browse

Creating a Binary Tree | Idea and simple example with live demo | Study Algorithms

6.1K views
Oct 9, 2021
11:32

A tree is just a way to organize data such that we can perform queries and manipulations quickly. But how do you create one? In this video we learn the idea behind the structure of a tree node and how it can be used to create a complete tree. This makes it obvious that tree algorithms will follow a recursion based algorithmic paradigm. The code sample is written in JAVA Chapters: 00:00 - Intro 00:57 - Recap of List node structure 02:55 - Idea behind a Tree Node 06:04 - Structure of Binary Tree Node 06:48 - Dry-run of Code to create a Binary Tree 10:12 - Final Thoughts 📚 Links to topics I talk about in the video: Arrays: https://youtu.be/4L7exNipj2M Single Linked List: https://youtu.be/lrXpTVEAXCM Double Linked Lists: https://youtu.be/mcKGKBVHUOM Recursion Algorithmic Paradigm: https://youtu.be/FTTHkmnvzlM Tree Data Structure: https://youtu.be/PzpmrQjIzYY Playlist on Trees: https://www.youtube.com/playlist?list=PLFdAYMIVJQHPswf74XJDtuWV-4BOeP65l 📘 A text based explanation is available at: https://studyalgorithms.com Code on Github: https://github.com/nikoo28/java-solutions/blob/master/src/main/java/util/TreeNode.java 📖 Reference Books: Starting Learn to Code: https://amzn.to/36pU0JO Favorite book to understand algorithms: https://amzn.to/39w3YLS Favorite book for data structures: https://amzn.to/3oAVBTk Get started for interview preparation: https://amzn.to/39ysbkJ 🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalgorithms 🎥 My Recording Gear: Recording Light: https://amzn.to/3pAqh8O Microphone: https://amzn.to/2MCX7qU Recording Camera: https://amzn.to/3alg9Ky Tablet to sketch and draw: https://amzn.to/3pM6Bi4 Surface Pen: https://amzn.to/3pv6tTs Laptop to edit videos: https://amzn.to/2LYpMqn 💻 Get Social 💻 Follow on Facebook at: https://www.facebook.com/studyalgos Follow on Twitter at: https://www.twitter.com/studyalgorithms Follow on Tumblr at: https://studyalgos.tumblr.com/ Subscribe to RSS feeds: https://studyalgorithms.com/feed/ Join fan mail: http://eepurl.com/g9Dadv #datastructures #programming #trees

Download

1 formats

Video Formats

360pmp430.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Creating a Binary Tree | Idea and simple example with live demo | Study Algorithms | NatokHD