Brain Teasers & Puzzles
-
The Little ant seems to be always confused.
You know why ?View SolutionSubmit Solution- 1,295.1K views
- 1 answers
- 0 votes
-
When does an American/Indian Potato changes its nationality ?
View SolutionSubmit Solution- 1,295.8K views
- 1 answers
- 0 votes
-
- 1,298.7K views
- 2 answers
- 0 votes
-
- 1,444.3K views
- 1 answers
- 0 votes
-
Consider a game that you play against an opponent. In front of you are an even number of coins of possibly different denominations. The coins are arranged in a line. You and your opponent take turns selecting coins. Each player takes one coin per turn and must take it from an end of the line, that is, the current leftmost coin or the current rightmost coin. When all coins have been removed, add the value of the coins collected by each player. It is possible that you and your opponent end up with the same value (for example, if all coins have the same denomination). Develop a strategy where you take the first turn and where your final value is at least that of your opponent (that is, don’t let your opponent end up with coins worth more than your coins).
Submit Solution- 1,440.4K views
- 0 answers
- 0 votes
-
A spy is located on a one-dimensional line. At time 0, the spy is at location A. With each time interval, the spy moves B units to the right (if B is negative, the spy is moving left). A and B are fixed integers, but they are unknown to you. You are to catch the spy. The means by which you can attempt to do that is: at each time interval (starting at time 0), you can choose a location on the line and ask whether or not the spy is currently at that location. That is, you will ask a question like “Is the spy currently at location 27?” and you will get a yes/no answer. Devise an algorithm that will eventually find the spy.
Submit Solution- 1,440.8K views
- 0 answers
- 0 votes
-
Consider the following array operations. Init(N,d) initializes an array of N elements so that each element has value d. Once Init has been called, the following two operations can be applied: For any i such that 0 <= i < N, Get(i) returns the array element at position i and Set(i,v) sets the array element at position i to the value v.
Given any amount of memory you want, implement the three operations so that each operation has an O(1) time complexity.
Submit Solution- 1,440.4K views
- 0 answers
- 0 votes
-
100 prisoners agree on a strategy before playing the following game: One at a time (in some unspecified order), each of the prisoners is taken to a courtyard where there is a line of 100 boxes. The prisoner gets to make choices to open 50 of the boxes. When a box is opened, it reveals the name of a prisoner (the prisoners have distinct names). The names written in the boxes are in 1-to-1 correspondence with the prisoners; that is, each name is found in exactly one box. If after opening 50 boxes, the prisoner has not found his own name, the game is over and all the prisoners lose. But if the prisoner does find the box that contains his name among the 50 boxes he opens, then the prisoner is taken to the other side of the courtyard where he cannot communicate with the others, the boxes are once again closed, and the next prisoner is brought out into the courtyard. If all prisoners make it to the other side of the courtyard, they win.
One possible strategy is for each prisoner to randomly select 50 boxes and open them. This gives the prisoners 1 chance out of 2100 to win–a slim chance, indeed. But the prisoners can do better, using a strategy that for a random configuration of the boxes will give them a larger chance of winning. How good a strategy can you develop?
Submit Solution- 1,440.2K views
- 0 answers
- 0 votes
-
A park contains paths that intersect at various places. The intersections all have the properties that they are 3-way intersections and that, with one exception, they are indistinguishable from each other. The one exception is an intersection where there is a restaurant. The restaurant is reachable from everywhere in the park. Your task is to find your way to the restaurant.
The park has strict littering regulations, so you are not allowed to modify the paths or intersections (for example, you are not allowed to leave a note an intersection saying you have been there). However, you are allowed to do some bookkeeping on a pad of paper that you bring with you at all times (in the computer-science parlance, you are allowed some state). How can you find the restaurant?
You may assume that once you enter an intersection, you can continue to the left, continue to the right, or return to where you just came from.
Submit Solution- 1,440.3K views
- 0 answers
- 0 votes
-
Given is a (possibly enormous) rectangular chocolate bar, divided into small squares in the usual way. The chocolate holds a high quality standard, except for the square in the lower left-hand corner, which is poisonous. Two players take turns eating from the chocolate in the following manner: The player whose turn it is points to any one of the remaining squares, and then eats the selected square and all squares positioned above the selected square, to the right of the selected square, or both above and to the right of the selected square. Note, although the board starts off rectangular, it may take on non-rectangular shapes during game play. The object of the game is to avoid the poisonous square. Assuming the initial chocolate bar is larger than 1×1, prove that the player who starts has a winning strategy.
Hint: To my knowledge, no efficient strategy for winning the game is known. That is, to decide on the best next move, a player may need to consider all possible continuations of the game. Thus, you probably want to find a non-constructive proof. That is, to prove that the player who starts has a winning strategy, prove just the existence of such a strategy; in particular, steer away from proofs that would construct a winning strategy for the initial player.
Submit Solution- 1,440.7K views
- 0 answers
- 0 votes
More puzzles to try-
Touch your face
I touch your face, I am in your words, I am a lack of space and beloved by birds. What ...Read More »Random Airplane Seats
People are waiting in line to board a 100-seat airplane. Steve is the first person in the line. He gets ...Read More »Complete The Series
N U S J M E V ?Read More »Catch the Lying Member
A Japanese ship was en route to a mission on foreign seas. The captain of the ship felt tired and ...Read More »Find The Hidden Animals
Can you find the six hidden animals in the picture below?Read More »Look as flat
It come across as flat, But theirs more to it than its surface; You climb its mountains from top to ...Read More »Vacation Time
Four women, Louise, Lise, Carole and Lily are seated at a table. They are chatting about their holidays. They went ...Read More »Programming logic puzzle
What will be the output of the following program?Read More »Captain Ali is the Captain of the Ship riddle
Captain Ali is the Captain of the Ship. The Captain of the Ship is Captain Ali. What is the name ...Read More »English Letters
Name an English word of more than two letters that both begins and ends with the letters “he” in the ...Read More »Feeling Smart
If you know it, you feel accomplished. If you don\’t know it, you feel stupid. What is it?Read More »Tricky Triangle Riddle
Can you find out which triangle will have a bigger area among the following? 1. A triangle with sides 300, ...Read More »Create Number
Create a four digit number in which the first digit is one fourth of the last digit, Second digit is ...Read More »Rounding Off Numbers
Find a 9-digit number, which you will gradually round off starting with units, then tenth, hundred etc., until you get ...Read More »Road sign riddle
Last night, I was looking at a road sign and could see that Leeds was 13 miles away, Stoke was ...Read More »Cross the River
Joseph organises an exotic office New year party at the beach to his important fellow employees. Following are the important ...Read More »Dice Puzzle
The name of the game is Petals Around the Rose, and that name is significant. Newcomers to the game can ...Read More »how far are the two ends of chain from each other?
There is a chain nailed to the wall. The chain is 10 feet long and the center of the chain ...Read More »How can you burn the two ropes in the time?
There are two ropes that both take exactly 1 hour to burn from end to end. You are unable to ...Read More »Falls without hurt
What falls often but never gets hurt ?Read More »