## Merge K sorted arrays | Set 3 ( Using Divide and Conquer Approach )

Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples: Input : arr[][] = {{5,… Read More »

## In-Place Merge Sort

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… Read More »

## Iterative Merge Sort for Linked List

Given a singly linked list of integers, the task is to sort it using iterative merge sort. Recommended: Please solve it on “PRACTICE” first, before… Read More »

## Quick Sort vs Merge Sort

Prerequisite :Merge Sort and Quick Sort Quick sort is an internal algorithm which is based on divide and conquer strategy. In this: The array of… Read More »

## Merge two sorted linked list without duplicates

Merge two sorted linked list of size n1 and n2. The duplicates in two linked list should be present only once in the final sorted… Read More »

## Merge Sort with O(1) extra space merge and O(n lg n) time

We have discussed Merge sort. How to modify the algorithm so that merge works in O(1) extra space and algorithm still works in O(n Log… Read More »

## Merge Sort Tree for Range Order Statistics

Given an array of n numbers, the task is to answer the following queries: kthSmallest(start, end, k) : Find the Kth smallest number in the… Read More »

## Sorted merge in one array

Given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B. Merge B into A in… Read More »

Merge Sort is a popular sorting technique which divides an array or list into two halves and then start merging them when sufficient depth is… Read More »

## Alternate sorting of Linked list

Given a linked list containing n nodes. The problem is to rearrange the nodes of the list in such a way that the data in… Read More »

## Microsoft IDC Interview Experience | Set 150 (Off-Campus for Full Time)

I applied Off campus through Microsoft referral program. Initially the shortlisting was done on the basis of CV. Round 1: First round was Online coding… Read More »

## Find array with k number of merge sort calls

Given two numbers n and k, find an array containing values in [1, n] and requires exactly k calls of recursive merge sort function. Examples:… Read More »

## Counting cross lines in an array

Given an unsorted array of distinct elements. Task is to count number of cross lines formed in an array elements after sorting the array elements.… Read More »

## How to make Mergesort to perform O(n) comparisons in best case?

As we know, Mergesort is a divide and conquer algorithm that splits the array to halves recursively until it reaches an array of the size… Read More »

## Subarray Inversions

We have an array A of n integers that we’re planning on sorting. Specifically, we want to know how close the array is to sorted.… Read More »