Solving the Staircase Problem: How Many Ways Can You Climb?

Ready to solve a popular DSA problem? We are going to learn this problem called "climbing stairs". Problem Statement You are faced with a staircase that has a certain number of steps, denoted by n. Each time, you can either climb 1 step or 2 steps. The goal is to figure out how many distinct... Continue Reading →

A complete tutorial on Binary Tree

Introduction   Figure 1 shows a Binary Search Tree. This post will start with the motivation of studying BST and gradually move to the related definitions. We will do some hands on coding for simple BST operations and we will end the post by analysing the drawbacks. Where do we use Binary Search Tree? Trees... Continue Reading →

Depth First Search In Python to print nodes of Graph

Graph Shown above is a simple graph. Let's define the characteristic of the graph: This is a connected graph. Meaning, you can travel from anywhere to anywhere in this graph.  Read further here This is an undirected graph. That simply means we don't have any direction sense to the arrow connecting two nodes This is... Continue Reading →

Network Flows – Maximum Flow

Network flows is a class of problems dealing with directed graphs and the properties of functions defined on the graph. Flow Flow represents any element which does not disappear while traveling through the edges of the directed graph. Flow can be current in the electric network, data packets in case of the computer network and... Continue Reading →

Binary Heap – Data Structure

Usage In Heapsort In Priority Queue Not the garbage collector storage (as provided by JVM) Definition A binary Heap is an array object. We can view that array object as a near complete binary tree. A binary tree is said to be a complete binary tree when all the nodes except possibly for the leaves... Continue Reading →

A Tutorial to Understand Decision Tree ID3 Learning Algorithm

Introduction Decision Tree learning is used to approximate discrete valued target functions, in which the learned function is approximated by Decision Tree. To imagine, think of decision tree as if or else rules where each if-else condition leads to certain answer at the end. You might have seen many online games which asks several question and lead... Continue Reading →

Up ↑