Skip to content

Tag Archives: Merge Sort

Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. Order of elements… Read More
Senior android Developer Coding Round: Spirally traversing a matrix Longest Increasing Subsequence First Round: find “longest line” of 1’s in array. Hoizontal and Vertical. Array… Read More
  Given two sorted arrays, the task is to merge them in a sorted manner.Examples:  Input: arr1[] = { 1, 3, 4, 5}, arr2[] =… Read More
TimSort is a sorting algorithm based on Insertion Sort and Merge Sort. A stable sorting algorithm works in O(n Log n) time Used in Java’s… Read More
Given a permuted array of length N of first N natural numbers, we need to tell the minimum number of swaps required in the sorted… Read More
Given an array of integer values which need to be sorted by only one operation – subarray rotation where subarray size should be 3. For… Read More
Given an integer array of which both first half and second half are sorted. Task is to merge two sorted halves of array into single… Read More
Online test: Coding : Time : 90 minutes There were three coding questions as follows: A man starts from his house with a few pan… Read More
Given a number ‘n’ and a n numbers, sort the numbers using Concurrent Merge Sort. (Hint: Try to use shmget, shmat system calls). Part1: The… Read More
Some of the merge operation classes are provided in C++ STL under the header file “algorithm”, which facilitates several merge operations in a easy manner.… Read More
A surpasser of an element of an array is a greater element to its right, therefore x[j] is a surpasser of x[i] if i <… Read More
We have discussed sorting weapons used by different languages in previous article. In this article, C++’s Sorting Weapon, Introsort is discussed. What is Introsort? Simply… Read More
Ever wondered how sort() function we use in C++/Java or sorted() in Python work internally? Here is a list of all the inbuilt sorting algorithms… Read More
Given K sorted linked lists of size N each, merge them and print the sorted output. Examples:  Input: k = 3, n = 4 list1… Read More
Given a set of elements, find which permutation of these elements would result in worst case of Merge Sort.Asymptotically, merge sort always takes O(n Log… Read More