Hi! In the previous posts we learned about the traversal algorithms used on graphs: DFS and BFS. I am sure you have understood the algorithm and are eager to solve some questions using those algorithms. In this post we will discover how to use the algorithms to solve problems. We will solve today is Bicoloring.Continue reading “Graphs, their traversal and use cases – III”
Category Archives: Graphs
Graphs, their traversal and use cases – II
Hi!In our previous blog, we learned about how Graphs can be used to represent common relationships in real life and how we represent graphs in code. In this blog we will learn how to traverse or walk through various nodes in a graph. In this realm of traversing, there are mainly two major methods: BFSContinue reading “Graphs, their traversal and use cases – II”
Graphs, their traversal and use cases – I
Hi!In High School we have already studied graphs and how they are used to showcase our data but in Computer Science, Graphs as a Data Structure are a completely different concept. We use graphs to represent relationships between one or more entities. The nodes represent the entities and relationships are depicted by edges. A graphContinue reading “Graphs, their traversal and use cases – I”