First page Next page

Q1: Classic: If a bear walks one mile south, turns left and walks one mile to the east and then turns left again and walks one mile north and arrives at its original position, what is the color of the bear.
tags: microsoft puzzle

Q2: 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 puzzle

Q3: There are 3 boxes. One of them has red balls, one has blue balls only and the other has mixture of red and blue balls. The labels on their boxes always lie. (i.e. if the label says red, you are sure that it doesn't have red balls only,it could be a mixture) The task is to pick one box and pick only one ball from it and then correctly label all the three boxes.
tags: microsoft puzzle

Q4: You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighings how do you find the defective one?
tags: microsoft puzzle

Q5: Why is a manhole cover round?
tags: microsoft puzzle

Q6: How many cars are there in the USA? (or how many gas stations or how many houses)
tags: microsoft puzzle

Q7: You've got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?
tags: microsoft puzzle

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

Q10: Imagine you are standing in front of a mirror, facing it. Raise your left hand. Raise your right hand. Look at your reflection. When you raise your left hand your reflection raises what appears to be his right hand. But when you tilt your head up, your reflection does too, and does not appear to tilt his/her head down. Why is it that the mirror appears to reverse left and right, but not up and down?
tags: microsoft puzzle

Q11: You have 5 jars of pills. Each pill weighs 10 gram, except for contaminated pills contained in one jar, where each pill weighs 9 gm. Given a scale, how could you tell which jar had the contaminated pills in just one measurement?
tags: microsoft puzzle

Q12: If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
tags: microsoft 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

Q16: Which way should the key turn in a car door to unlock it?
tags: microsoft puzzle

Q17: If you could remove any of the 50 states, which state would it be and why?
tags: microsoft 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

Q19: (from Tara Hovel) A helicopter drops two trains, each on a parachute, onto a straight infinite railway line. There is an undefined distance between the two trains. Each faces the same direction, and upon landing, the parachute attached to each train falls to the ground next to the train and detaches. Each train has a microchip that controls its motion. The chips are identical. There is no way for the trains to know where they are. You need to write the code in the chip to make the trains bump into each other. Each line of code takes a single clock cycle to execute. You can use the following commands (and only these); MF - moves the train forward MB - moves the train backward IF (P) - conditional that is satisfied if the train is next to a parachute. There is no "then" to this IF statement. GOTO
tags: microsoft sw programming 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

Q36: How many points are there on the globe where by walking one mile south, one mile east and one mile north you reach the place where you started.
tags: microsoft puzzle

Q44: How would go about finding out where to find a book in a library. (You do not know how exactly the books are organized beforehand).
tags: microsoft sw programming puzzle

Q60: A version of the "There are three persons X Y Z, one of which always lies".. etc..
tags: microsoft 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

Q63: There are 4 women who want to cross a bridge. They all begin on the same side. You have 17 minutes to get all of them across to the other side. It is night. There is one flashlight. A maximum of two people can cross at one time. Any party who crosses, either 1 or 2 people, must have the flashlight with them. The flashlight must be walked back and forth, it cannot be thrown, etc. Each woman walks at a different speed. A pair must walk together at the rate of the slower woman's pace. Woman 1: 1 minute to cross Woman 2: 2 minutes to cross Woman 3: 5 minutes to cross Woman 4: 10 minutes to cross For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed when they get to the other side of the bridge. If Woman 4 then returns with the flashlight, a total of 20 minutes have passed and you have failed the mission. What is the order required to get all women across in 17 minutes? Now, what's the other way?
tags: microsoft puzzle

Q86: If you are in a boat on a lake and you throw out a suitcase, Will the level of water increase in the lake?
tags: microsoft puzzle

Q103: A real life problem - A square picture is cut into 16 squares and they are shuffled. Write a program to rearrange the 16 squares to get the original big square.
tags: microsoft sw programming puzzle algorithms

Q110: If you are familiar with the ? operator x ? y : z, you want to implement that in a function: int cond(int x, int y, int z); using only ~, !, ^, &, +, |, <<, >> no if statements, or loops or anything else, just those operators, and the function should correctly return y or z based on the value of x. You may use constants, but only 8 bit constants. You can cast all you want. You are not supposed to use extra variables, but in the end, it will not really matter, using vars just makes things cleaner. You should be able to reduce your solution to a single line in the end though that requires no extra vars.
tags: microsoft sw programming puzzle

Q111: You have an abstract computer, so just forget everything you know about computers, this one only does what I am about to tell you it does. You can use as many variables as you need, there are no negative numbers, all numbers are integers. You do not know the size of the integers, they could be infinitely large, so you cannot count on truncating at any point. There are NO comparisons allowed, no if statements or anything like that. There are only four operations you can do on a variable. 1) You can set a variable to 0. 2) You can set a variable = another variable. 3) You can increment a variable (only by 1), and it is a post increment. 4) You can loop. So, if you were to say loop(v1) and v1 = 10, your loop would execute 10 times, but the value in v1 would not change so the first line in the loop can change value of v1 without changing the number of times you loop. You need to do 3 things. 1) Write a function that decrements by 1. 2) Write a function that subtracts one variable from another. 3) Write a function that divides one variable by another. 4) See if you can implement all 3 using at most 4 variables. Meaning, you are not making function calls now, you are making macros. And at most you can have 4 variables. The restriction really only applies to divide, the other 2 are easy to do with 4 vars or less. Division on the other hand is dependent on the other 2 functions, so, if subtract requires 3 variables, then divide only has 1 variable left unchanged after a call to subtract. Basically, just make your function calls to decrement and subtract so you pass your vars in by reference, and you cannot declare any new variables in a function, what you pass in is all it gets. Linked lists
tags: microsoft sw programming puzzle

Q144: Write a function to check if two rectangles defined as below overlap or not. struct rect { int top, bot, left, right; } r1, r2;
tags: microsoft sw programming puzzle

Q174: You have 2 candles. Every candle lights for 60 minutes. You have to find the way to measure 45 minutes.
tags: microsoft google ebay puzzle

Q175: A band is going in the street with a constant speed. Someone in the last row has a dog. The dog runs ahead, reaches the front row of the band and gets back to it's owner. The dog's speed was constant all the way and while it was running the band passed 50 feet. Find the length of the dog's path,if the distance between the front and the rear row of the band is 50 feet.
tags: microsoft puzzle

Next page


b(ond)log