# Month: September 2020

## Intro of Algorithm

The word Algorithm mostly familiar in Math and Computer Science fields. But this term is not limited to these fields. Informally, algorithms mean steps of solving a problem. We can solve any kind of problem algorithmically. In computer science, the use of algorithms is everywhere. Using algorithms, we can come up with the most efficient […]

## 1342. Number of Steps to Reduce a Number to Zero | LeetCode | Python | Solution

Here is the link to this problem. Read the problem description carefully before solving this problem. It’s an easy Leetcode problem. Here we will be given a non-negative number. We have to reduce the number based on some requirements until it gets zero. And then have to return how many steps it takes. To reduce […]

## (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

## 704. Binary Search | LeetCode | Python | Solution

Read the problem description first. To see the problem, click here. There is nothing to explain. It’s nothing but a binary search implementation. If you know how to implement Binary Search, then you already know the solution. Since you are in Leetcode, I believe you know this searching algorithm. If you don’t know binary search, […]

## 404. Sum Of Left Leaves | LeetCode | Python | Solution

This problem description is pretty simple. The description is: find the sum of all left leaves in a given binary tree. Here is the link of the problem. Let’s see the tree from the example. We see a binary tree in the above example. In a binary tree, each node has at most two child […]

## Center An Element Vertically and Horizontally Using Flexbox

Often we have to center an element vertically and horizontally. We can do this easily using CSS Grid and Flexbox. But it was boring before the advent of CSS Grid and Flexbox. Let’s see an example first. Suppose we have a container with a black border. Inside this container, we have an element with a […]