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].

by Dhaval Dave

Given a Binary Tree, print the diagonal traversal of the binary tree

Consider lines of slope -1 passing between nodes. Given a Binary Tree, print all diagonal elements in a binary tree belonging to same … Read More

by Dhaval Dave

Given a rectangular grid where each cell contains some coins. You are at the first row and you want to go to the last row with the objective of collecting … 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

Number Theory is used a lot for solving real world problems and for the same reason It’s asked most of the time in interviews. This article marks the beginning of series of articles over Number … Read More

by Dhaval Dave

by Dhaval Dave

by Dhaval Dave

You are given a string T which consists of 0’s and 1’s. Now you input two non-empty strings U and V. Then your task is to match the Regular Expression – U*V with the given … Read More

by Dhaval Dave

Given two strings x and y, What is the cheapest possible way to convert x into y where following operations are allowed to perform –

- Substitute a character c of x with c’.
- Insert