# Tag Archives: array-merge

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 lists representing N transactions, the task is to merge the given lists of transactions in the order of… Read More
Given two arrays A[] and B[] consisting of N and M integers respectively, the task is to calculate the maximum prefix sum that can be… 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 A[] of size N (1 ≤ N ≤ 105), the task is to calculate the number of swaps required to sort the… Read More
Given an array arr[] consisting of 2* N elements in the form of { a1, a2, …, aN, b1, b2, …, bN }, the task… Read More
Given two sorted arrays A[] and B[] of size N, the task is to check if it is possible to merge two given sorted arrays… Read More
Given two sorted arrays, arr[], brr[] of size N, and M, the task is to merge the two given arrays such that they form a… 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
This is an extension of the median of two sorted arrays of equal size problem. Here we handle arrays of unequal size also. Examples:  Input:… Read More
Given 2 strings, merge them in an alternate way, i.e. the final string’s first character is the first character of the first string, the second… Read More
Given k sorted arrays of possibly different sizes, merge them and print the sorted output.Examples:   Input: k = 3 arr[][] = { {1, 3}, {2,… Read More
Given two array of size n and m. The task is to find the number of ways we can merge the given arrays into one… Read More
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 sorted… Read More