Similar Collections

We are trying to list out the most frequently asked interview problems or the problem given in the coding rounds of IT giants.


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 raining?
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have the same width and the width is 1 unit
Given a sorted array of integers, find the floor and ceil of given number x in it. The floor and ceil value of a number points to the largest previous or the smallest following integer respectively
Given a sorted array with possibly duplicate elements, the task is to find indexes of first and last occurrences of an element x in the given array
You are given an array Arr, you have to find the maximum value of the expression (Arr[i1]-Arr[i2]+Arr[i3]-Arr[i4]) where i1>i2>i3>i4 and (0<=i1,i2,i3,i4<n)
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. Find the minimum element. You may assume no duplicate exists in the array
Given two arrays A and B of size N each, find the maximum N elements from the sum combination (A[i]+B[j]) formed elements A and B
You are given two prime numbers n and m of 4 digits each, you need to convert n into m in the minimum number of steps, in each step you can change one of the digits of the number n such that a resulting number is also a prime number
You are given an array A of integers of size N. You will be given Q queries where each query is represented by two integers L, R. You have to find the gcd(Greatest Common Divisor) of the array after excluding the part from range L to R inclusive (1 Based indexing)
The stock span problem is a financial problem where we have a series of n daily price quotes for a stock and we need to calculate the span of stock\'s price for all n days
total questions: 10





Best Answers