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.

questions

Title
We have given items i1, i2 , ..., in (the item we want to put in our bag) with associated weights w1, w2, ... wn and profit values V1, V2, ... Vn. Now the problem is how we can maximize the total benefit given a capacity of the bag is W and each item is allowed to be used for 0 or 1 time?
A professional robber is planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping him from robbing each of them is that adjacent houses have security system connected
Given a value N, find the number of ways to make change for N cents, if we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins. The order of coins doesn\'t matter
Given a value V, if we want to make change for V cents, and we have infinite supply of each of C = { C1, C2, .. , Cm} valued coins, what is the minimum number of coins to make the change?
Given a dictionary, you have to split a given string into meaningful words
There are N friends, each one of them can remain single or can be paired up with some other friend. Each friend can be paired only once. Find out the total number of ways to do so. Since inputs are big return answer MOD 10^9+7
n stock market, a person buys a stock and sells it on some future date. Given the stock prices of N days in form of an array Amount and a positive integer K, find out the maximum profit a person can make in at most K transactions
Given a weighted directed graph, the problem is to find the shortest distances between every pair of vertices. The Graph is represented by an adjacency matrix, and any cell arr[i][j] denotes the weight of the edge (path cost) from node i to node j (if it exists) else INF
You are given an array A of size N. The array contains integers and is of even length. The elements of the array represent N coin of values x1, x2, ... ,xn
Consider a highway of M miles. The task is to place billboards on the highway such that revenue is maximized
Given a gold mine of n*m dimensions, each cell in this mine contains a positive integer which is the amount of gold in tons. Initially, the miner is at the first column but can be at any row
Given a sequence A of size N, find the length of the longest increasing subsequence from the given sequence
Given a non-negative integer n, count all numbers with unique digits, x, 0<=x<10^n
Given a number N, write a program to print the minimum number of squares that sums to N
Given a value P, you have to make change for P cents, given that you have infinite supply of each of C { C1, C2, ... ,Cn} valued coins
Given an array, you have to find out the length of the longest bitonic subsequence from the array
Given string str, find the length of the longest repeating subsequence
Given two strings str1 and str2, find length of the longest common sub-sequence between them
Given n dice each with m faces, numbered from 1 to m, find the number of ways to get sum X. X is the summation of values on each face when all the dice are thrown
Given a rod of length N inches and an array of prices that contains prices for all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces
total questions: 87

Questions

87

Views

911

Best Answers

299

Points

5