00:00Hi everyone! In this chapter, we are going to talk about a very important and very special data structure which
00:05is called Graphs. Graphs is a new data structure which we are going to study and from the interview perspective,
00:11it is very important. If I tell you about which three topics are in the data structure and algorithms, which
00:16are the chances of coming in interviews, then I will call them one name, because there are many questions in
00:23the graphs.
00:24There are a variety of questions that come into your coding test and ask in your interviews. There are a
00:30lot of algorithms that use the graph and implement them. We will also study the algorithms. We will learn many
00:35questions and many things in graphs.
00:40There is such a data structure that companies implement in real life. You have heard a complaint about data structures
00:46and algorithms that we learn so much, but they don't implement in companies. But graphs are actually very practical systems
00:54that companies develop. So graph is a very interesting data structure. If I talk about graph, graph is a collection
01:04of... In fact, I will call it a network.
01:10of nodes network network network network network network network network network network network network network network network network network network
01:15network network network network network network network network network network network network network network network network network network network network
01:21network network network network network network network
01:39Vertex means a point, a bend or a corner where we can reach different places. The node in the graph
01:48gets to the vertex and it gets to the plural of vertices.
01:53Now we connect this line to the vertex. We call this line as edge. In the graph, we have a
01:58network of different nodes. In this network, we have a lot of vertices inside each vertex. We call it edge
02:08structure.
02:09Now the graph data structure will be seen in real life many times. If I take the most simple example,
02:15we will have seen Google Maps or Uber or Ola, which we have booked a cab. We will have seen
02:21the map. So that map can also be implemented internally in a graph. If I can visualize a random map,
02:30what can I do? There will be different cities in which there are different roads. Imagine that I have taken
02:35a example of Delhi. This is my node.
02:40This is my node. For example, a city is Jaipur. This is my node. Besides, I have taken a state's
02:47example. I have taken a Gujarat's example. So, this is my node. Now, let's consider Delhi from Sonipat and Jaipur
02:56from Sonipat and Sonipat from Gujarat.
03:01graph type structure. So we can visualize the maps in the graph form and then we can use graph algorithms.
03:10Then we can see the shortest path in the Google map. So we will actually do an algorithm in the
03:17graph that we can use the shortest path from one place to the other. In this way, we are going
03:22to do interesting algorithms that are actually used in many places. We are going to be able to see graphs
03:28in real life applications.
03:31not only in the maps, not in the machine learning areas.
03:35There are a lot of different areas in which graphs are practically used. They are very strong applications. First of
03:42all, let's talk about a bit of a boring part in which we are going to study graph theory. In
03:48graph theory, we will understand which types of graphs, what we call nomenclature, what we implement them in Java, which
03:55is very important to understand how we are going to code in the graph. After that, we will talk about
04:03some applications.
04:04how to use graphs. And then we will do many questions and learn many algorithms which are very interesting.