First page

Q8: One train leaves Los Angeles at 15mph heading for New York. Another train leaves from New York at 20mph heading for Los Angeles on the same track. If a bird, flying at 25mph, leaves from Los Angeles at the same time as the train and flies back and forth between the two trains until they collide, how far will the bird have traveled?
tags: microsoft math puzzle

Q9: You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then a marble will be picked from the jar. Placing all of the marbles in the jars, how can you maximize the chances of a red marble being picked? What are the exact odds of getting a red marble using your scheme?
tags: microsoft math puzzle

Q15: You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like color. How many do you have to grab to be sure you have 2 of the same?
tags: microsoft math puzzle

Q18: There are four dogs/ants/people at four corners of a square of unit distance. At the same instant all of them start running with unit speed towards the person on their clockwise direction and will always run towards that target. How long does it take for them to meet and where?
tags: microsoft math puzzle

Q29: Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ?
tags: microsoft math puzzle

Q61: There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner.. what is the probability that they do not collide.
tags: microsoft sw math puzzle

Q80: An array of integers of size n. Generate a random permutation of the array, given a function rand_n() that returns an integer between 1 and n, both inclusive, with equal probability. What is the expected time of your algorithm?
tags: microsoft sw programming math

Q177: A man is running across a bridge.When he is 3/8 of the way accross, he heard a train coming behind him. If he keeps running he will reach the end of the bridge at the same time with the train. If he turns around and runs back, he will get to the beginning of the bridge at the same time as the train. The man runs at a speed of 5mph. What is the speed of the train?
tags: microsoft puzzle math

Q190: There are four ants on a square, one at each corner. At the same time, they all set off for a different corner at random. What is the probability that they don't collide?
tags: microsoft puzzle math

Q224: How many 0's are at the end of N!
tags: google puzzle algorithm math

Q227: There are a set of 'n' integers. Describe an algorithm to find for each of all its subsets of n-1 integers the product of its integers. For example, let consider (6, 3, 1, 2). We need to find these products : 6 * 3 * 1 = 18 6 * 3 * 2 = 36 3 * 1 * 2 = 6 6 * 1 * 2 = 12
tags: google math puzzle programming algorithm

Q239: Rank the functions in order of their asymptotic behaviour ( which is the greatest) 1. 2^n 2. n! 3. n^googol ( googol=10^100) 4. n^n
tags: google software math

Q555: If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)
tags: google math puzzle

Q560: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7
tags: microsoft google math sw puzzle

Q571: How many lines can be drawn in a 2D plane such that they are equidistant from 3 non-collinear points
tags: google puzzle math

Q589: Given a file with 4 billion 32bit integers, how do you find an missing integer from the file? In other words, which integer didn't show up in this file? You are given only 16MB memory.( not using external sorting)
tags: google sw math



b(ond)log