Hotel Reservation system such as Oyo, Trivago, Hotels.com etc is a really big project, considering different aspects of System Design. The main challenges included in that is to design HLD of the whole system which … Read More
Given a collection of intervals, merge all overlapping intervals.
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 a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the … Read More
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
Given two words word1 and word2, find the edit distance between word1 and word2 i.e. minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on … Read More
Given a non-empty binary tree, find the maximum path sum.
For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child … Read More
Fibonacci Hashing : How do we find out what this Fibonacci Hashing is?
In real world Fibonacci hashing is not implemented or used even a part of it, because it’s actually more (Time and Space) … Read More
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
Interleave List If input = [[1,2,3], [9, 0], , [-4,-5,-2,-3,-1]] then output = [1,9,5,-4,2,0,-5,3,-2,-3,-1];
Asked in Facebook F2F… Read More
Serialise Deserialise N-ary Tree : N-ary tree’s each node contains at-most N children. Serialise the tree means storing the tree in array or file maintaining tree’s exact structure. On the other hand Deserialise the tree … Read More