Register | Login

Published News » Interview Questions

Product of all Elements Except One

Posted by csguy (#13) 552 days ago (Editorial)
Given an Arrays A[]. Find a new array B[] of same length N with each element B[i] = Product of all elements of A except A[i].
Example A = {1,2,3}
B={6,3,2}

Dictionary Word with Minimum Edit Distance

Posted by csguy (#13) 552 days ago (Editorial)
How will you implement a spell checker algorithm.
Given a word and a dictionary propose and algorithm to get the word in dictionary which has least edit distance from the given word.

Find Conflicts in Schedule

Posted by csguy (#13) 553 days ago (Editorial)
Given 'n' appointments each having a startime and an endtime. Retun all conflicting appointments

Coinage problem

Posted by bollywood1 (#6) 553 days ago (Editorial)
You have coins with different denominations and you have limited number of each denominations (some maybe zero). how will you determine if you can supply the given change.

Store 1 Million Phone Numbers

Posted by indian1 (#2) 555 days ago (Editorial)
What is the most efficient way, memory-wise, to store 1 million phone numbers?

Fair Coin From Biased Coin

Posted by indian1 (#2) 556 days ago (Editorial)
How can you get a fair coin toss from a biased coin?

Problem: N/2 Unique and N/2 Duplicates

Posted by indian1 (#2) 556 days ago (Editorial)
An array of size n, has n/2 unique elements and n/2 occurences of an element. Find the non-unique element in linear time?

Maximum Area Under a Histogram

Posted by indian1 (#2) 556 days ago (Editorial)
Find the maximum rectangle ( area-wise ) completely contained inside the histogram. The heights of the bars of the histograms are given in an array e.g. Let the histogram has values(Y - values) {4,2,10,8,12,13,15,8,6}

The rectangles formed here are:
4X1, 2X9, 10X1, 8X6, 12X3, 13X2, 15X1, 8X6, 6X7
Thus, max-area rectangle = 8X6 = 48

Puzzle: Climbing Steps One or Two At a Time

Posted by indian1 (#2) 556 days ago (Editorial)
A person can take one or two steps at a time while climbing N steps. How many different ways can a person climb?

Fox and the Duck Puzzle

Posted by csguy (#13) 557 days ago (Editorial)
A duck, pursued by a fox, escapes to the center of a perfectly circular pond. The fox cannot swim, and the duck cannot take flight from the water. The fox is four times faster than the duck. Assuming the fox and duck pursue optimum strategies, is it possible for the duck to reach the edge of the pond and fly away without being eaten? If so, how?

Line Intersecting the Most number of Points

Posted by csguy (#13) 557 days ago (Editorial)
There are a large number of points on a 2D plane. Find a line which passes through the most number of points.

Merge 2 Binary Search Trees

Posted by indian1 (#2) 557 days ago (Editorial)
How can you merge two BST inplace so that preserving the BST property?

Measure 45 Minutes

Posted by indian1 (#2) 558 days ago (Editorial)
There are unlimited ropes and all of them will burn in 1 hour.
How to measure 45 mins?

3 Baskets Puzzle

Posted by indian1 (#2) 558 days ago (Editorial)
There are three baskets labeled Orange , Apple, Oracle/Apple. And all of them have wrong labels.How to find the correct label by checking only one basket

Datastructure for Large Set of Numbers

Posted by indian1 (#2) 559 days ago (Editorial)
Given a large file of integers, how to compress the file so that we can also do search efficiently?

Farthest Decreasing Pair

Posted by indian1 (#2) 559 days ago (Editorial)
Given an array A[], find (i, j) such that A[i]

Inverted Index Search

Posted by indian1 (#2) 560 days ago (Editorial)
We have a sorted list of document_id-s for alls keywords. Given a search string, how to find the documents that have all keywords in the search string?

Spinning Wheel Puzzle

Posted by indian1 (#2) 564 days ago (Editorial)
Imagine a disk spinning like a record player turn table. Half of the disk is black and the other is white. Assume you have an unlimited number of color sensors. How many sensors would you have to place around the disk to determine the direction the disk is spinning? Where would they be placed?

Generate Power Set

Posted by indian1 (#2) 564 days ago (Editorial)
How to generate the power set of a set of numbers?

2^i * 5^j Puzzle

Posted by indian1 (#2) 564 days ago (Editorial)
Assume that we are interested in a number sequence where each number is a multiple of 2 or 5 (so: 2^i * 5^j), e.g. 1,2,4,5,8,10,16, 20, 25, 32.., Find Nth number in the series. Given Nth number find the N+1 th number
Sort News
Username:

Password:

Remember:
Indian Social News and Links Network