Merge alternate nodes of the two lists

We have already seen the code to merge two sorted linked list, such that the final list is also sorted. The logic and code can […]

Merge two sorted arrays

Given two sorted arrays of size m and n respectively. Also given an empty third array of size (m+n). write code to merge the two […]

Minimum number of platform required for a railway station

Given arrival and departure times of all trains for a particular railway station, write code to find the minimum number of platforms required on that […]

Merging two Linked List

Given two linked list with Node values sorted in ascending order. Write function that accepts these two linked lists, merge them and return pointer to […]

Find kth element in union of two arrays

Given two sorted arrays of size m and n respectively. Find the kth element in the merged result of A and B. For example, If the inputs (A, B […]

Merge two arrays into one

There are 2 sorted arrays of size m and m+n respectively. First array (of size m) has m elements and Second array (of size m+n) […]