Count possible ways to construct buildings
Given an input number of sections and each section has 2 plots on either sides of the road. Find all possible ways to construct buildings… Read More »
Given an input number of sections and each section has 2 plots on either sides of the road. Find all possible ways to construct buildings… Read More »
I was interviewed at Flipkart. Following was my interview experience. Initially there was one telephonic screening round. then I was called at their bangalore office.… Read More »
In a daily share trading, a buyer buys shares in the morning and sells it on the same day. If the trader is allowed to… Read More »
An interval is represented as a combination of start time and end time. Given a set of intervals, check if any two intervals overlap. Examples:… Read More »
There are 1000 wine bottles. One of the bottles contains poisoned wine. A rat dies after one hour of drinking the poisoned wine. How many… Read More »
Following is a typical recursive implementation of Merge Sort that uses last element as pivot. filter_none edit close play_arrow link brightness_4 code /* Recursive C… Read More »
Following is a typical recursive implementation of Merge Sort that uses last element as pivot. Java filter_none edit close play_arrow link brightness_4 code // Recursive… Read More »
Following is a typical recursive implementation of Merge Sort that uses last element as pivot. Python filter_none edit close play_arrow link brightness_4 code # Recursive… Read More »
Following is a typical recursive implementation of Merge Sort C/C++ filter_none edit close play_arrow link brightness_4 code /* Recursive C program for merge sort */… Read More »
Given an array that is sorted and then rotated around an unknown point. Find if the array has a pair with a given sum ‘x’.… Read More »
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing… Read More »
Given an array and a number ‘x’, write a function to delete ‘x’ from the given array. We assume that array maintains two things with… Read More »
Write a function subtract(x, y) that returns x-y where x and y are integers. The function should not use any of the arithmetic operators (+,… Read More »
Given a universe U of n elements, a collection of subsets of U say S = {S1, S2…,Sm} where every subset Si has an associated… Read More »
Given n cities and distances between every pair of cities, select k cities to place warehouses (or ATMs or Cloud Server) such that the maximum… Read More »