Showing posts with label Puzzles. Show all posts
Showing posts with label Puzzles. Show all posts

Saturday, November 22, 2008

Googly

1. There are set of coins of {50,25,10,5,1} paise in a box.Write a program to find the number of ways a 1 rupee can be created by grouping the paise.

2. Write a function that takes three integers corresponding to the lengths of sides and returns what kind of triangle can be made out of those 3 sides. (Equilateral, etc)

3. Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it’s only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?

4. You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it?

Thursday, November 20, 2008

Weigh the Balls :)

Given 3 red and 3 black balls. The 3 red balls weigh different, one heavy, one medium and other light. Similar is the case with black balls. The heavy, medium and light balls of both colors weigh the same. One heavy and one light ball weigh the same as two medium balls. Given a weighing balance, in 4 weighs, categorize each ball of both colors as heavy, medium and light.

Wednesday, November 19, 2008

Apples and Oranges

There are 3 baskets. One of them has apples, one has oranges and the last has mixture of apples and oranges. The labels on their baskets always lie. (i.e. if the label says oranges, you are sure that it doesn't have oranges only,it could be a mixture). The task is to pick one basket and pick only one fruit from it and then correctly label all the three baskets.

Monday, November 17, 2008

Coins problem

1. 8(Eight) Coins Problems :

Given 8 coins and a weighing balance (wherein weights of two objects can be compared by placing them in two different weighing pans). All coins except 1 weigh same. The exceptional coin weighs more than the others. Find that coin, in minimum number of weighs.

Given 8 coins and a weighing balance (wherein weights of two objects can be compared by placing them in two different weighing pans). All coins except 1 weigh same. The exceptional coin may weigh more or less than other coins. Find that coin and also whether it weighs more/less, in minimum number of weighs.

2. 12(Twelve) Coins Problem :

Given 12 coins and a weighing balance (wherein weights of two objects can be compared by placing them in two different weighing pans). All coins except 1 weigh same. The exceptional coin may weigh more or less than other coins. Find that coin and also whether it weighs more/less, in minimum number of weighs.

3. 'n' Coins Problem (Numeric Equation) :

Given 'n' number of coins and a weighing balance (wherein weights of two objects can be compared by placing them in two different weighing pans). All coins except 1 weigh same. The exceptional coin weighs more than the others. Find how many weighs, 'x', are required to find the exceptional coin. Device a numeric equation in 'n' and 'x'.

Given 'n' number of coins and a weighing balance (wherein weights of two objects can be compared by placing them in two different weighing pans). All coins except 1 weigh same. The exceptional coin may weigh more or less than the others. Find how many weighs, 'x', are required to find the exceptional coin and whether it weighs more/less. Device a numeric equation in  'n' and 'x'.