# Tag Archives: Merge Sort

Given a singly linked list of integers, the task is to sort it using iterative merge sort.    Recommended: Please solve it on “PRACTICE” first,… Read More
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 of size n1 and n2. The duplicates in two linked list should be present only once in the final sorted… Read More
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
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
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
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
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
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
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:   Input… Read More
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. Note:… Read More
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
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
Veritas visited our college for campus hiring. The CTC offered was 9.26 LPA. There were a total of 105 candidates eligible for the recruitment test.… Read More
This a common question asked in DS interviews that despite of better worst case performance of mergesort, quicksort is considered better than mergesort. There are… Read More