Tree Traversal

Binary Tree Traversal Algorithms | DFS | Algorithm

There are three Depth First Search (DFS) types of traversal algorithms for Binary Tree. Traversal algorithms are for traversing in a Binary Tree. These three are variations of the Depth First Search (DFS) algorithm. In DFS, we start traversing from the root and go in-depth until there is no node to traverse. Its uses in […]

Binary Tree | Data Structure

I have written a blog about the tree data structure overview. If you don’t know about tree data structure, click here to see my blog. In this blog, we will be going to know about Binary Tree. I hope you will get some idea of it. A binary tree is a type of tree. But

Binary Tree Preorder Traversal | LeetCode 144 | Python | Solution

Click here to see the problem on LeetCode. The problem description is pretty straightforward. We have to return all the nodes’ values following the preorder traversal algorithm. I can assume that you have a basic understanding of Tree data structure. Mainly, there are four types of traversing algorithms in Binary Tree. Preorder traversal is one

(Pre|In|Post)Order Traversal In Binary Tree | Recursive Way | Code Snippet

Tree traversal algorithms are easy. Let’s see the Python implementation of these three types of tree traversal in the recursive way. Click here to see the iterative implementation of tree traversals. TreeNode Class Pre Order Traversal In Order Traversal Post Order Traversal

4 Types Of Binary Tree Traversal | Algorithm Implementation | Iterative Way | Code Snippet

The tree is one of the most important data structures in computer science. We are going to see the Python implementation of tree traversals. In this blog, we will see only iterative implementation. Pre Order Traversal In Order Traversal Post Order Traversal Level Order Traversal

Scroll to Top