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 »

Preorder Tree Traversal in Python

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

Preorder Tree Traversal in Python Read More »

Balanced Binary Tree in Python

In this article, we will study balanced binary trees and we will try to implement a program in Python to determine if a binary tree is balanced or not. To read this article, you should be familiar with the concept of binary trees. What is a Balanced Binary Tree? A balanced binary tree is defined

Balanced Binary Tree in Python Read More »

Decorators in Python [Explained]

Let’s talk about a niche topic today – Decorators in Python. This is a simple but powerful tool that, as the name suggests, decorates functions. Pre-Requisite knowledge There are a few concepts we need to know before proceeding with Decorators in Python, namely, higher-order functions and nested functions – two sides of the same coin.

Decorators in Python [Explained] Read More »