• 2 days ago
Transcript
00:00Hi everyone, now we are going to talk about an important topic which is called Binary Trees.
00:05Trees is a very important topic. In fact, I will talk about the final interview of Microsoft PPO
00:10so I was asked about the question of trees.
00:14My friends and friends have been interviewed in Google.
00:16They have also asked about the question of trees.
00:19We have to focus on this topic.
00:21We are discussing what is tree and data structure.
00:25We will talk about how to create and build.
00:28We will talk about how to search and travel.
00:33We will discuss a lot of classical questions from Google, Microsoft, Facebook.
00:41When we are talking about trees, we are specifically going to study Binary Trees.
00:48When we ask questions in interview, we will mostly ask Binary Trees.
00:53If we understand the Binary Trees,
00:54if we understand the Binary Trees,
00:56then we will also ask the Binary Trees.
00:59When we talk about tree,
01:00tree is a hierarchical data structure.
01:03Before we read many data structures,
01:06such as Link List, Stacks, Queue,
01:08all the data structures are linear.
01:11But tree is a hierarchical data structure.
01:14What does it mean to say hierarchical data structure?
01:16It becomes a hierarchy.
01:18In which we used to create a chart.
01:48We used to create a tree for a family tree.
01:50If we want to save a code, we will use which data structure?
01:53We will use tree data structure.
01:55Besides, we can take another example of our computer.
01:59There is a folder called My Computer.
02:02There are different drives.
02:04There are C Drive and D Drive.
02:06There are different folders.
02:08If we take another example, there are Dean and Principal.
02:12There are different HODs.
02:15Mechanical department, Electrical department,
02:17and Biological department.
02:21After all, all teachers and students are here.
02:26This is our hierarchy and data.
02:29If we want to store this data,
02:33we will use our code as a tree data structure.
02:36When we talk about real-life tree,
02:38we have a diagram.
02:41We have the nodes that we call root.
02:44We call root.
02:45Then there are our Tehni, which is called branches.
02:48Then there are our Paths, which are called leaf.
02:52Now, this whole structure,
02:54we get into code in a form of diagram.
02:56There is a small twist.
02:58The root was below,
02:59but the tree was above the code.
03:02The leaf was above,
03:04but the tree was below the code.
03:06There is a small change.
03:08How does the tree be visualise?
03:10The tree goes above the node.
03:12The root node come above this node.
03:15The node is above the node.
03:16We call data store.
03:17Here are several new branches from the node.
03:21Then there will be other branches.
03:22There will be other nodes.
03:23And there are different nodes.
03:24The node within each node has a data store.
03:25Here are nodes in our node.
03:29We call this part root
03:32And those nodes
03:33We call our leaf nodes
03:38Now the binary tree is a special type
03:43Binary tree is a tree
03:44Which is at max
03:46Two children
03:48Now every node
03:51From our first tree
03:53There are many nodes
03:54But when a tree
03:57In each node
04:01We call the binary tree
04:07Binary trees
04:08There are special properties
04:09Which we will see
04:11Before we discuss
04:14Terminologies
04:15Which we will use
04:16First we will discuss
04:16Terminologies
04:16One
04:16One
04:16Okay.