Given a collection of intervals, merge all overlapping intervals.

**Example 1: ** Input: [[2,6],[8,10],[15,18], [1,3]]

Output: [ [1,6] , [8,10] , [15,18] ]

Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].

Interview Questions asked in Google, Microsoft, Amazon

Given a collection of intervals, merge all overlapping intervals.

**Example 1: ** Input: [[2,6],[8,10],[15,18], [1,3]]

Output: [ [1,6] , [8,10] , [15,18] ]

Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].

Given *n* non-negative integers *a _{1}*,

by Dhaval Dave

Word Search : Given a 2D board and a word, search if the word exists in the grid.

The word can be constructed from letters of sequentially adjacent cell,

where “adjacent” cells are those horizontally … Read More

by Dhaval Dave

Given an array *A* of *N* positive integer values. A sub-array of this array is called Odd-Even sub-array if the number of odd integers in this sub-array is equal to the number of even integers … Read More

by Dhaval Dave

Interleave List If input = [[1,2,3], [9, 0], [5], [-4,-5,-2,-3,-1]] then output = [1,9,5,-4,2,0,-5,3,-2,-3,-1];

Asked in Facebook F2F… Read More

by Dhaval Dave

by Dhaval Dave

Given a set T containing a list of integers and a sum S, does a subset of T exists whose sum is equal to S.

NOTE – Subset … Read More

by Dhaval Dave

by Dhaval Dave

Trapping Rain Water or Water collected between towers : Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after … Read More

by Dhaval Dave

Given n ranges in the form of Start Number and End Number in Two Array L and R such that

L[i]-R[i] is one range given. Our task is to … Read More