Aditya Raj

I am currently pursuing Bachelor of Technology and MBA (dual degree) in Information Technology from Indian Institute of Information Technology. I love teaching and writing articles on computer science and related topics.

Depth-first search in a graph

Depth-first search is a traversal technique in which we traverse a graph and print the vertices exactly once. In this article, we will study and implement the depth-first search for traversing graphs in python. Recommended read: Implementing a graph in Python What is the Depth-First Search Algorithm? In a depth-first search, we traverse each vertex …

Depth-first search in a graph Read More »

Breadth-First Search in a Graph

Breadth-first search is a traversal technique in which we traverse a graph and print the vertices exactly once. In this article, we will study and implement the breadth-first search for traversing graphs in python. What is the Breadth-First Search Algorithm? In breadth-first search, we traverse each vertex of the graph exactly once by starting from …

Breadth-First Search in a Graph Read More »

Implementing a Graph in Python

A graph is a data structure used to illustrate connections between two objects. A simple example of a graph is a geographical map in which different places are connected by roads. In this article, we will study the theoretical aspects of a graph data structure. Additionally, we will implement a graph using two different methods.  …

Implementing a Graph in Python Read More »

Heaps in Python

In this article, we will learn about an important Data Structure, Heaps in Python (known as heap queue in Python). We will learn about the data structure and its implementation and then look at the Python code for the same. What are Heaps in Python? Heaps in Python are complete binary trees in which each …

Heaps in Python Read More »

Postorder Tree Traversal in Python

In this article, we will study the concept and algorithm for postorder tree traversal. Then we will implement the algorithm for postorder traversal in python and run it on a binary tree. What is Postorder Tree Traversal? Postorder traversal is a depth-first tree traversal algorithm. In depth-first traversal, we start at the root node and …

Postorder Tree Traversal in Python Read More »