Graph is a widely used data structure in real world applications. Lots of companies and lots of software’s use it to solve their problems.
Based on the type of graph, different use-cases use graphs in different scenarios. While directed are useful for building algorithms, undirected are also useful for lots of different real-world scenarios.

In this blog, we will be diving deep into all the applications of different types of graphs in real world scenarios. Many of the applications are pretty insightful and fascinating, some might also help you generate some interesting and exciting projects. While some will give you an idea about how many things around you are possible because of graphs.
So, without further ado, let’s jump into the applications.
What Will You Learn?
Applications of Graph Data Structure
Graphs, as non-linear data structures, consist of a limited set of nodes or vertices interconnected by edges. They offer practical solutions by mirroring various real-world scenarios, such as telephone networks, circuit networks, and social networks.
There are a variety of applications of graphs in data structures. Graph, a fundamental data structure in computer science, go beyond the realm of simple nodes and edges to model complex relationships and connections.
Followings are some of the applications of this data structure in real world –
- Social Networks (Facebook)
- World Wide Web (Internet)
- Google Maps
And many more applications are seen in the real world, let’s jump into each of these applications to understand how graphs are used in them.
We all might have tried facebook at least once in our life right? So, let’s start from understanding how facebook suggests you friends.
Social Networks (Facebook)
Social Networks use undirected graphs to understand what kind of content they should show you and whose posts you might want to see the most. Also, it helps them understand who your potential friend could be based on your current friends.
In the social media, everyone is considered as a vertex and the edge between these vertices is the connection that they have formed. If you are A, and your friends are B and C, then there is an edge directly going from you to B and C. And because it is undirected it is also a vice versa. So, it means B and C are also connected to you.
If you expand this whole scenario, then you’ll see a huge graph where everybody is connected through somebody. If you are connected to B and B is connected to D. Then Facebook will suggest D as your potential friend.
The same approach follows for different posts from many people, whether their friend or someone you don’t know but still you are seeing their post. It is because they are somehow related to the people who are connected to you.
This blog is on the internet, but how did you find this blog? World wide web is also a big graph!
World Wide Web (WWW)
The Internet is one of the most essential tools in today’s world. Without the Internet, we might not be able to do anything. But do you know what is behind the Internet?
If your guess is graph, then you are absolutely right!
In the Internet, every page and every link of a page is connected to some other page and this connection makes it possible for you to go from one page to another page.
Because of this, it was possible for Google to find this blog and deliver it to you. For you to find this blog, Google has to crawl the whole web and has to find links, which leads to some other links, which then again leads to some other links and finally it comes to The Startup Coder.
Crawlers are able to crawl web pages because every page is connected, and every page has some link which leads to the next page. This is how crawlers are able to surf the Internet, get the data and also the search engines, using these crawlers are able to index those web pages.
Do you also use google maps when you are lost or want to know some shortcuts to your destination?
Google Maps
In our daily life we always use Google Maps to find the shortest route to reach our destination to save some time, and sometimes we don’t know where to go and we have to use Google Maps to find the route from our current place to our destination.
What is the algorithm that made this whole process so smooth and accurate?
Graph!!
Google maps use graphs for building transportation systems, where two (or more) roads are considered vertices and the road connecting two vertices is considered to be an edge, thus their navigation system is based on the algorithm to calculate the shortest path between two vertices.
And how do they know the shortest route which saves you hours of a long journey?
It is called djikstra’s algorithm, which is an algorithm built using graphs data structure.
Google maps uses lots of advanced algorithms that are not mentioned here, but at the core of it, they are based on graphs and their algorithms.
Conclusion
As a final conclusion, graph have a lot of impactful applications in the real world. You will see lots of real-world applications of graphs apart from these 3 examples. And in the upcoming future, we might see a lot of other use cases as well.
Learning graphs could be one of the best things you can do in your data structures and algorithm journey.
Liked this blog? Start reading the next blog here where I discuss about the concepts and implementation of stack and queue using C.
References: