## Binary Search Tree

A binary search tree is a Binary tree with some rules that allows us to maintain the data in a sorted fashion. As it is a binary tree hence, a node can have at max 2 children. Structure of a Binary Search Tree node   Rules for Binary tree to …

## Binary Tree Data Structure

In this article, we will read about the Binary Tree Data Structure. Trees are hierarchical data structures where every node has a parent node except the root node. The nodes with no child are called leaves. Need for Trees? 1. Trees are used when we need to store data in …

## Types of Binary Tree

Before we proceed, we first know what BT really is? Binary Tree is a type of data structure that is hierarchical in nature. A BT is represented by nodes where every node has left, a right pointer, and data as the weight of node. Each node can contain a maximum …

## BFS vs DFS for Binary Tree

Breadth First Search (BFS) Do we already know about what actually BFS is? if not then don’t need to feel bad just read the whole article and visit our previous article on Breadth First Search for better understanding. BFS is a level order traversal in which we visit the nodes of …

## Depth First Search (DFS) for a Graph

Depth First Search is a traversing or searching algorithm in tree/graph data structure. The concept of backtracking we use to find out the DFS. It starts at a given vertex (any arbitrary vertex) and explores it and visit the any of one which is connected to the current vertex and start …

## Fibonacci numbers

Fibonacci numbers are the numbers that form the series called Fibonacci series and are represented as Fn. The first two Fibonacci numbers are 0 and 1 respectively i.e. F0=0 and F1=1. Starting from the third Fibonacci number each Fibonacci number is the sum of its previous two numbers in the …

## Graph and its representation

A graph is an abstract data type representing relations or connections between objects(like cities are connected by rough road). In the graph and its representation, basically, the relation is denoted by edges and objects by vertices(nodes). A graph consists of a finite set of vertices and edges. A graph is …

## Circular Queue

A circular queue is an advanced form of a linear queue. In the linear queue, we can’t insert an element in the queue if the rear is pointing to the last index of the queue and the queue is not completely filled. This causes wastage of memory. To overcome this …

## Dynamic Programming Basics

In Dynamic Programming basics, we will cover the basics of DP and its differences from the Greedy method, Divide and Conquer and Recursion. Dynamic programming is an approach just like recursion and divide and conquer. It divides the problem into subproblems. But instead of solving these subproblems independently like divide …

## Recursive Palindrome Check

Problem Statement In the “Recursive Palindrome Check” problem we have given a string “s”. We have to write a program to check if the given string is palindrome or not using recursion. A palindrome is a word, number, phrase, or other sequences of characters that reads the same backward as …