# Tag Archives: Merge Sort

Given a binary string s, the task is to calculate the number of such substrings where the count of 1‘s is strictly greater than the… Read More
Given two positive integers, N and M, and an array arr[ ] consisting of (N + M) integers such that the first N elements are… Read More
Given an array A[] of size N, the task is to sort the array in increasing order using In-Place Merge Sort. Examples: Input: A =… Read More
Given an array arr[] consisting of N integers, the task is to count the number of greater elements on the right side of each array… Read More
Given an array arr[] of length N and an integer K, the task is to count the number of pairs (i, j) such that i… Read More
Given an array arr[] consisting of N unique elements, the task is to generate an array B[] of length N such that B[i] is the… Read More
Visualizing algorithms makes it easier to understand them by analyzing and comparing the number of operations that took place to compare and swap the elements.… Read More
Given an N-ary Tree rooted at 1, and an array val[] consisting of weights assigned to every node, and a matrix Q[][], consisting of queries… Read More
Prerequisites: Introduction to Matplotlib, Merge Sort Visualizing algorithms makes it easier to understand them by analyzing and comparing the number of operations that took place… Read More
Given an array arr[] of size N and Q queries of the form [L, R], the task is to find the number of distinct values… Read More
Pre-requisite: Merge Sort, Insertion Sort Merge Sort: is an external algorithm and based on divide and conquer strategy. In this sorting: The elements are split… Read More
The human brain can easily process visuals instead of long codes to understand the algorithms. In this article, a program that program visualizes the Merge… Read More
Introsort(Introspective sort) is a comparison based sort that consists of three sorting phases. They are Quicksort, Heapsort, and Insertion sort. Basic concepts of Introsort and… Read More
Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples:  Input: arr[][] = {{5, 7,… Read More
Implement Merge Sort i.e. standard implementation keeping the sorting algorithm as in-place. In-place means it does not occupy extra memory for merge operation as in the… Read More