Brain Teasers & Puzzles
-
The Little ant seems to be always confused.
You know why ?View SolutionSubmit Solution- 1,309.2K views
- 1 answers
- 0 votes
-
When does an American/Indian Potato changes its nationality ?
View SolutionSubmit Solution- 1,310.0K views
- 1 answers
- 0 votes
-
- 1,312.8K views
- 2 answers
- 0 votes
-
- 1,458.5K 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,454.5K 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,454.9K 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,454.6K 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,454.4K 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,454.4K views
- 0 answers
- 0 votes
More puzzles to try-
Label the Box correctly
There are three boxes which are labeled as Rs100, Rs150, and Rs200. One box contains two notes of Rs. 50. ...Read More »Arrange 7 men in alternative height
There are 7 people numbered as 1 to 7. The number denotes their height. Arrange them in a line in ...Read More »King and wise jeweler’s Gold rings puzzle
A king asks a learned man to visit his palace, to which the learned man responds: “I will come some ...Read More »A Man in Mexico City riddle
A man in Mexico City has 20 Peso. He spends 16 Peso on flowers, and 3 Peso on lunch (hot ...Read More »Find the roses
At the recent spring fete, four keen gardeners were displaying their fine roses. In total there were four colours and ...Read More »How did the girl who drank the most survive?
Two girls ate dinner together. They both ordered iced tea. One girl drank them very fast and had finished five ...Read More »Hot Cup of coffee and cream riddle
You are served a hot cup of coffee and room-temperature cream at a restaurant. You want to wait a few ...Read More »Famous 5000 Sum trick puzzle
Genuinely write the answer to this sum trick puzzle- “Take a 1000 plus 40 plus 1000 plus 30 plus 20 ...Read More »Broken Bone fixing riddle
Bone is cracked, Help Tom to Fix the Bone. Out of 14 pieces, Which is the broken part of the ...Read More »One colour but not one size riddle
He has one colour, but not one size, Stuck at the bottom, yet easily flies. Present in sun, but not ...Read More »81 Cows and milk distribution Puzzle
A man has eighty one cows ( numbered 1,2,3…81 as such). The beauty is that cow no. 1 gives 1ltr ...Read More »Sandrew’s birthday chocolate distribution puzzle
Today is Sandrew’s birthday for which he is distributing chocolates. There are 100 chocolates in his chocolate box. The box ...Read More »One have five riddle
This is what you use to write But it is not a pen One of these has five fingers And ...Read More »Delivery Incentive
John was a very careless driver, so his owner Jacob gave him an offer that he will get an incentive ...Read More »ABC + DEF + GHI = JJJ, what does J represents?
Consider the sum: ABC + DEF + GHI = JJJ If different letters represent different digits, and there are no ...Read More »Connect 3 houses with 3 wells
Connect every house with every well without the lines intersecting.Read More »Purchasing from $33
John has $33.00 dollars. He bought 5 colouring books that cost $4.00 each, 3 boxes of crayola crayons that cost ...Read More »Find the pattern
How Louise kept on reading in dark puzzle
On a dark night Louis and Adam were sitting together. Adam was watching movie while his wife Louis was reading ...Read More »Open the Laptop
Open a Laptop which is password protected. Hint for the password is given as below: 1 mobile 3 books 2 ...Read More »