Level order tree traversal

Other than usual pre, post, and in-order binary tree traversals. There are other ways to traverse a binary tree. We will see level order traversals in this article. In the level order traversal, tree nodes process level by level. There are two ways to solve this level order traversal problem. Recursive Approach In this approach,Read More »

Binary Search

Given a sorted array of integers and a number to find whether the given number exists in the given sorted array using Binary Search. Binary Search is the most widely used search algorithm for sorted arrays. As per this algorithm, input array divided into two parts based on some mid-index then compares the mid elementRead More »

Heap Sort

Sort given array of integers in ascending/descending order using the Heap Sort algorithm. Heap Sort is also one of the most common sorting algorithms used in millions of applications. Heaping is a technique used in this algorithm to find the shortest number. Any new number added in heap will be heapify with complexity. Heap SortRead More »

Merge Sort

Given an array of integer values aim is to sort them in ascending/descending order using the Merge Sort algorithm. Merge Sort is a high performing sorting technique similar to quicksort. This sorting algorithm works by using the divide and conquer method. Merge sort divides the input array into half parts recursively until it has 1Read More »

Quicksort

Given an array of numbers aim is to sort them ascending/descending order using quick sort algorithm. Quick Sort is the most famous and one of my favorite search algorithm which is used in millions of software applications and systems. C++ programmings default std::sort() uses the quick sorting technique to sort the input. Quicksort algorithm techniqueRead More »