Programming Puzzles Page 9
 

More Puzzles

Page 1

Page 2

Page 3

Page 4

Page 5

Page 6

Page 7

Page 8

Page 9

Freshers Resources

QA & Testing

Data WareHousing Computer Science Analysis  Design Operating Systems
C++ Mainframes Sap/Abap Databases HR VB
Java Jobs C#

.Net

VC++ ASP

    Brain Teaser No : 00001

At what time immediately prior to Six O'clock the hands of the clock are exactly opposite to each other. Give the exact time in hours, minutes and seconds.
Answer

It is obvious that between 5 O'clock and 6 O'clock the hands will not be exactly opposite to each other. It is also obvious that the hands will be opposite to each other just before 5 O'clock. Now to find exact time:

The hour hand moves 1 degree for every 12 degrees that the minute hand moves. Let the hour hand be X degree away from 5 O'clock. Therefore the minute hand is 12X degree away from 12 O'clock.

Therefore solving for X

Angle between minute hand and 12 O'clock + Angle between 12 O'clock and 4 O'clock + Angle between 4 O'clock and hour hand = 180
12X + 120 + (30-X) = 180
11X = 30
Hence X = 30/11 degrees
(hour hand is X degree away from 5 O'clock)

Now each degree the hour hand moves is 2 minutes.

Therefore minutes are
= 2 * 30/11
= 60/11
= 5.45 (means 5 minutes 27.16 seconds)

Therefore the exact time at which the hands are opposite to each other is
= 4 hrs. 54 min. 32.74 seconds

Ali Baba had four sons, to whom he bequeathed his 39 camels, with the proviso that the legacy be divided in the following way :

The oldest son was to receive one half the property, the next a quarter, the third an eighth and the youngest one tenth. The four brothers were at a loss as how to divide the inheritance among themselves without cutting up a camel, until a stranger appeared upon the scene.
Dismounting from his camel, he asked if he might help, for he knew just what to do. The brothers gratefully accepted his offer.

Adding his own camel to Ali Baba's 39, he divided the 40 as per the will. The oldest son received 20, the next 10, the third 5 and the youngest 4. One camel remained : this was his, which he mounted and rode away.

Scratching their heads in amazement, they started calculating. The oldest thought : is not 20 greater than the half of 39? Someone must have received less than his proper share ! But each brother discovered that he had received more than his due. How is it possible?
Answer

They took their percentages from 40 and not from 39, so they got more than their share.

The oldest son got 1/2 of 40 = 20 which is 0.5 more
The second son got 1/4 of 40 = 10 which is 0.25 more
The third son got 1/8 of 40 = 5 which is 0.125 more
The youngest son got 1/10 of 40 = 4 which is 0.1 more

And the stranger got 1/40 of 40 = 1 which is 0.025 more (As he is not supposed to get anything)

All these fractions add to = 0.5 + 0.25 + 0.125 + 0.1 + 0.025 = 1 which stranger took away.
There is a family party consisting of two fathers, two mothers, two sons, one father-in-law, one mother-in-law, one daughter-in-law, one grandfather, one grandmother and one grandson.

What is the minimum number of persons required so that this is possible?
Answer

There are total 2 couples and a son. Grandfather and Grand mother, their son and his wife and again their son. So total 5 people.

Grandfather, Grandmother
|
|
Son, wife
|
|
Son


A man went into a fast food restaurant and ate a meal costing Rs. 105, giving the accountant a Rs. 500 note. He kept the change, came back a few minutes later and had some food packed for his girl friend. He gave the accountant a Rs. 100 note and received Rs. 20 in change. Later the bank told the accountant that both the Rs. 500 and the Rs. 100 notes were counterfeit.

How much money did the restaurant lose? Ignore the profit of the food restaurant.
Answer

He lost Rs.600

First time restaurant has given food worth Rs.105 and Rs. 395 change. Similarly second time, food worth Rs.80 and Rs.20 change. Here, we are not considering food restaurant profits.

               S L I D E

             -   D E A N

               ---------

                 3 6 5 1
Each of seven digits from 0-9 are represented by a different letter above such that the subtraction is true.

What word represents 3651?
Answer

3651 represents LENS.

Let's assign possible values to each letter and then use trial-n-error.

S must be 1.

Then D (under L) must be greater than 5. If D is 6, then L is 0. But then A must be 0 or 1 which is impossible. Hence, the possible values of D are 7, 8 or 9.

N must be E + 1. Also, D must be A + 5 as the possible values of D are 7, 8 or 9, D can not be (10+A) + 5.

Now using trial-n-error, we get S=1, I=2, L=3, A=4, N=5, E=6 and D=9

         S  L  I  D  E             1  3  2  9  6

       -    D  E  A  N           -    9  6  4  5

         --------------            --------------

            3  6  5  1                L  E  N  S
Hence, 3651 represents LENS.
Adam, Burzin, Clark and Edmund each live in an apartment. Their apartments are arranged in a row numbered 1 to 4 from left to right. Also, one of them is the landlord.
1. If Clark's apartment is not next to Burzin's apartment, then the landlord is Adam and lives in apartment 1.
2. If Adam's apartment is right of Clark's apartment, then the landlord is Edmund and lives in apartment 4.
3. If Burzin's apartment is not next to Edmund's apartment, then the landlord is Clark and lives in apartment 3.
4. If Edmund's apartment is right of Adam's apartment, then the landlord is Burzin and lives in apartment 2.
Who is the landlord?

Answer

Clark is the landlord.

Assume each statement true, one at a time and see that no other statement is contradicted.

Let's assume that Statement (1) is true. Then, Adam is the landlord and lives in apartment 1. Also, other three's apartments will be on the right of his apartment - which contradicts Statement (4) i.e. If Edmund's apartment is right of Adam's apartment, then the landlord is Burzin. Thus, Adam is not the landlord.

Let's assume that Statement (2) is true. Then, Edmund is the landlord and lives in apartment 4. Also, other three's apartments will be on the left of his apartment - which again contradicts Statement (4) i.e. If Edmund's apartment is right of Adam's apartment, then the landlord is Burzin. Thus, Edmund is not the landlord either.

Let's assume that Statement (3) is true. Then, Clark is the landlord and lives in apartment 3. It satisfies all the statements for
(1) Adam - (2) Edmund - (3) Clark - (4) Burzin

Hence, Clark is the landlord.

Similarly, you can assume Statement (4) true and find out that it also contradicts.
    Brain Teaser No : 00456

B, J and P are related to each other.
1. Among the three are B's legal spouse, J's sibling and P's sister-in-law.
2. B's legal spouse and J's sibling are of the same sex.
Who is the married man?
Answer

J is the married man.

Note that a person's sister-in-law may be the wife of that person's brother or the sister of that person's spouse.

There are 2 cases:
1. If B's legal spouse is J, then J's sibling must be P and P's sister-in-law must be B.
2. If B's legal spouse is P, then P's sister-in-law must be J and J's sibling must be B.
It is given that B's legal spouse and J's sibling are of the same sex. Also, it is obvious that P's sister-in-law is female. Then, B's legal spouse and J's sibling both must be males.

          B's spouse   J's sibling   P's sister-in-law

           (male)        (male)          (female)

------------------------------------------------------

Case I       J             P                B

Case II      P             B                J

Case II is not possible as B & P are married to each other and both are male. Hence, J is the married man.
    Brain Teaser No : 00041

A polygon has 1325 diagonals. How many vertices does it have?
Answer

The formula to find number of diagonals (D) given total number of vertices or sides (N) is

                 N * (N - 3)   

           D  =  -----------      

                     2

Using the formula, we get
1325 * 2 = N * (N - 3)
N2 - 3N - 2650 = 0

Solving the quadratic equation, we get N = 53 or -50

It is obvious that answer is 53 as number of vertices can not be negative.

Alternatively, you can derive the formula as triange has 0 diagonals, quadrangel has 2, pentagon has 5, hexagon has 9 and so on......

Hence the series is 0, 0, 0, 2, 5, 9, 14, ........ (as diagram with 1,2 or 3 vertices will have 0 diagonals).

Using the series one can arrive to the formula given above.
    Brain Teaser No : 00076

A cube is made of a white material, but the exterior is painted black.

If the cube is cut into 125 smaller cubes of exactly the same size, how many of the cubes will have atleast 2 of their sides painted black?
Answer

44

36 of the cubes have EXACTLY 2 of their sides painted black, but because a cube with 3 of its sides painted black has 2 of its sides painted black, you must also include the corner cubes. This was a trick question, but hopefully the title of the puzzle tipped you off to this.
    Brain Teaser No : 00238

Imagine a triangle of coins on a table so that the first row has one coin in it and the second row has two coins in it and so on. If you can only move one coin at a time, how many moves does it take to make the triangle point the other way?

For a triangle with two row it is one, for a triangle with three rows it is two, for a triangle with four rows it is three.

For a traingle with five rows is it four?
Submitted
Answer

It takes 5 moves to make the triangle with 5 rows point the other way.

0 = a coin that has not been moved.
X = the old position of the moved coin
8 = the new position of the moved coin.

________X
_______X X
____8 0 0 0 8
_____0 0 0 0
____X 0 0 0 X
_______8 8
________8


For traingle of any number of rows, the optimal number of moves can be achieved by moving the vertically symmetrical coins i.e. by moving same number of coins from bottom left and right, and remaining coins from the top.


For a triangle with an odd number of rows, the total moves require are :
(N2/4) - (N-4) Where N = 4, 6, 8, 10, ...

For a triangle with even number of rows, the total moves require are :
((N2-1)/4) - (N-4) Where N = 5, 7, 9, 11, ...

Thanks to Alex Crosse for submitting above formulas.
    Brain Teaser No : 00053

A man is going to an Antique Car auction. All purchases must be paid for in cash. He goes to the bank and draws out $25,000.

Since the man does not want to be seen carrying that much money, he places it in 15 evelopes numbered 1 through 15. Each envelope contains the least number of bills possible of any available US currency (i.e. no two tens in place of a twenty).

At the auction he makes a successful bid of $8322 for a car. He hands the auctioneer envelopes number(s) 2, 8, and 14. After opening the envelopes the auctioneer finds exactly the right amount.

How many ones did the auctioneer find in the envelopes?
Answer

Each envelope contains the money equal to the 2 raised to the envelope number minus 1. The sentence "Each envelope contains the least number of bills possible of any available US currency" is only to misguide you. This is always possible for any amount !!!

One more thing to notice here is that the man must have placed money in envelopes in such a way that if he bids for any amount less than $25000, he should be able to pick them in terms of envelopes.

First envelope contains, 20 = $1
Second envelope contains, 21 = $2
Third envelope contains, 22 = $4
Fourth envelope contains, 23 = $8 and so on...

Hence the amount in envelopes are $1, $2, $4, $8, $16, $32, $64, $128, $256, $512, $1024, $2048, $4096, $8192, $8617

Last envelope (No. 15) contains only $8617 as total amount is only $25000.

Now as he bids for $8322 and gives envelope number 2, 8 and 14 which contains $2, $128 and $8192 respectively.

Envelope No 2 conrains one $2 bill
Envelope No 8 conrains one $100 bill, one $20 bill, one $5 bill, one $2 bill and one $1 bill
Envelope No 14 conrains eighty-one $100 bill, one $50 bill, four $10 bill and one $2 bill

Hence the auctioneer will find one $1 bill in the envelopes.
    Brain Teaser No : 00090

The minute and the hour hand of a watch meet every 65 minutes.

How much does the watch lose or gain time and by how much?

Answer

The minute and the hour hand meet 11 times in 12 hours in normal watch i.e. they meet after every
= (12 * 60) / 11 minutes
= 65.45 minutes
= 65 minutes 27.16 seconds

But in our case they meet after every 65 minutes means the watch is gaining 27.16 seconds.
    Brain Teaser No : 00093

There is a number that is 5 times the sum of its digits. What is this number? Answer is not 0.
Answer

The number is 45, simply because
45 = 5 * (4 + 5)
How does one find this number?

Let T be the digit in the tens place and U be the digit in the units place. Then, the number is 10*T + U, and the sum of its digits is T + U.

The following equation can be readily written:
10*T + U = 5*(T + U) or
10*T + U = 5*T + 5*U or
5*T = 4*U

Thus, T / U = 4 / 5

Since T and U are digits, T must be 4 and U must be 5.
There are six boxes containing 5, 7, 14, 16, 18, 29 balls of either red or blue in colour. Some boxes contain only red balls and others contain only blue.

One sales man sold one box out of them and then he says, "I have the same number of red balls left out as that of blue."

Which box is the one he solds out?
Answer

Total no of balls = 5 + 7 + 14 + 16 + 18 + 29 = 89

Total number of balls are odd. Also, same number of red balls and blue balls are left out after selling one box. So it is obvious that the box with odd number of balls in it is sold out i.e. 5, 7 or 29.

Now using trial and error method,
(89-29) /2 = 60/2 = 30 and
14 + 16 = 5 + 7 + 18 = 30

So box with 29 balls is sold out.
    Brain Teaser No : 00218

Ekta got chocolates to give her friends on her Birthday. If she gives 3 chocolates to each friend, one friend will get only 2 chocolates. Also, if she gives 2 chocolates to each friends, she will left with 15 chocolates.

How many chocolates Ekta got on her Birthday? and how many friends are there?

Answer

47 Chocolates and 16 Friends

Let's assume that there are total C chocolates and F friends.

According to first case, if she gives 3 chocolates to each friend, one friend will get only 2 chocolates.
3*(F - 1) + 2 = C

Similarly, if she gives 2 chocolates to each friends, she will left with 15 chocolates.
2*F + 15 = C

Solving above 2 equations, F = 16 and C = 47. Hence, Ekta got 47 chocolates and 16 friends
Pooja and Esha met each other after long time. In the course of their conversation, Pooja asked Esha her age. Esha replied, "If you reverse my age, you will get my husbund's age. He is of course older than me. Also, the difference between our age is 1/11th of the sum of our age."

Can you help out Pooja in finding Esha's age?
Answer

Esha's age is 45 years.

Assume that Esha's age is 10X+Y years. Hence, her hunsbands age is (10Y + X) years.

It is given that difference between their age is 1/11th of the sum of their age. Hence,
[(10Y + X) - (10X + Y)] = (1/11)[(10Y + X) + (10X + Y)]
(9Y - 9X) = (1/11)(11X + 11Y)
9Y - 9X = X + Y
8Y = 10X
4Y = 5X

Hence, the possible values are X=4, Y=5 and Esha's age is 45 years.
A fish had a tail as long as its head plus a quarter the lenght of its body. Its body was three-quarters of its total length. Its head was 4 inches long.

What was the length of the fish?
Submitted

The fish is 128 inches long.

It is obvious that the lenght of the fish is the summation of lenghts of the head, the body and the tail. Hence,
Fish (F) = Head (H) + Body (B) + Tail (T)

But it is given that the lenght of the head is 4 inches i.e. H = 4. The body is three-quarters of its total length i.e. B = (3/4)*F. And the tail is its head plus a quarter the lenght of its body i.e. T = H + B/4. Thus, the equation is
F = H + B + T
F = 4 + (3/4)*F + H + B/4
F = 4 + (3/4)*F + 4 + (1/4)*(3/4)*F
F = 8 + (15/16)*F
(1/16)*F = 8
F = 128 inches

Thus, the fish is 128 inches long.

Assume that you have just heard of a scandal and you are the first one to know. You pass it on to four person in a matter of 30 minutes. Each of these four in turn passes it to four other persons in the next 30 minutes and so on.

How long it will take for everybody in the World to get to know the scandal?

Assume that nobody hears it more than once and the population of the World is approximately 5.6 billions.
Answer

Everybody in the World will get to know the scandal in 8 hours.

You came to know of a scandal and you passed it on to 4 persons in 30 minutes. So total (1+4) 5 persons would know about it in 30 minutes.

By the end of one hour, 16 more persons would know about it. So total of (1+4+16) 21 persons would know about it in one hour.

Similarly, the other (1+4+16+64) persons would have know about it in one and a half hours. (1+4+16+64+256) persons would have know about it in two hours and so on...

It can be deduced that the terms of the above series are the power of 4 i.e. 4^0, 4^1, 4^2, 4^3 and so on upto (2N+1) terms. Also, the last term would be 4^2N where N is the number of hours.

Sum of the above mentioned series = [4^(2N+1)-1]/3

The sum of the series must be 5.6 billions. Hence, equating the sum of the series with 5.6 billions, we get N=8 hours.

Scandals travel FAST !!!
        A  B  C

              D

              E  F  G

                    H

                    I
Each of the digits from 1 to 9 is represented by a different letter above. Also, A + B + C = C + D + E = E + F + G = G + H + I = 13

Which digit does E represent?
Answer

E represents 4.

Find out all possible groups of three different numbers that add up to 13 and arrange them according to given condition.

If one number is 9, it must go with 1 and 3.
If one number is 8, it must go with either 1 and 4 or 2 and 3.
If one number is 7, it must go with either 1 and 5 or 2 and 4.
If one number is 6, it must go with either 2 and 5 or 3 and 4.

It is clear that 9 must go with 1 and 3. Also, no digit may be used in more than two sums. Hence, there are 2 cases:
Case I: If 8 goes with 1 and 4, then 7 goes with 2 and 4, then 6 goes with 2 and 5.
Case II: If 8 goes with 2 and 3, then 7 goes with 2 and 4, then 6 goes with 3 and 4.

But in case II, 3 is used in three sums. Hence, Case I is correct. And the possible arrangements are:

     9  3  1                5  6  2

           8                      7

           4  7  2                4  8  1

                 6                      3

                 5                      9
Thus, E must be 4.
A, B and C are three points on a straight line, not necessarily equidistant with B being between A and C. Three semicircles are drawn on the same side of the line with AB, BC and AC as the diameters. BD is perpendicular to the line ABC, and D lies on the semicircle AC.

If the funny shaped diagram between the three semicircles has an area of 1000 square cms, find the length of BD.
Answer


The length of BD is 35.68 cms

There are 3 right-angled triangles - ABD, CBD and ADC.

From ABD, AB^2 + BD^2 = AD^2 ------ I
From CBD, CB^2 + BD^2 = CD^2 ------ II
From ADC, AD^2 + CD^2 = AC^2 ------ III

Adding I and II,
AB^2 + BC^2 + 2*BD^2 = AD^2 + CD^2 ------ IV

FROM III and IV
AB^2 + BC^2 + 2*BD^2 = AC^2
AB^2 + BC^2 + 2*BD^2 = (AB+CB)^2
2*BD^2 = 2*AB*CB
BD^2 = AB*CB
BD = SQRT(AB*CB)

Given that funny shaped diagram beween three semicircles has an area of 1000 square cms.
[PI/2 * (AC/2)^2] - [PI/2 * (AB/2)^2] - [PI/2 * (BC/2)^2] = 1000
PI/8 * [AC^2 - AB^2 - BC^2] = 1000
PI * [(AB+BC)^2 - AB^2 - BC^2] = 8000
PI * [2*AB*BC] = 8000
AB * BC = 4000/PI

Hence BD = SQRT(4000/PI) = 35.68 cms
where PI = 3.141592654

Hence, the length of BD is 35.68 cms.



Submit
Answer         Users
Answer (33)         BrainVista
Answer         P

    Brain Teaser No : 00660

Gomzi has 3 timepieces in his house - a wall clock, an alarm clock and a wristwatch. The wristwatch is always accurate, whereas the wall clock gains 2 minutes everyday and the alarm clock loses 2 minutes everyday.

At exactly midnight last night, all three watches were showing the same time.

If today is 25 July 2003, then on which date all three clocks will show the same time again?

Answer

All three clocks will show the same time again on midnight between 19 July 2004 and 20 July 2004.

A clock finishes on round in 12*60 i.e. 720 minutes.

If a clock gains 2 minutes everyday, then it would be 720 minutes ahead after 360 days. Thus, after 360 days, it will show the same time again.

Similary, if a clock loses 2 minutes everyday, then it would be 720 minutes behind after 360 days. Thus, after 360 days, it will show the same time again.

Thus, after 360 days all three clocks will show the same time again i.e. midnight between 19 July 2004 and 20 July 2004.
You have 9 marbles. 8 marbles weigh 1 ounce each, & one marble weighs 1.5 ounces. You are unable to determine which is the heavier marble by looking at them. You have a weighing scale that consists of 2 pans, but the scale is only good for 2 total weighings.

How can you determine which marble is the heaviest one using the scale & in 2 weighings?
Answer

Divide 9 marbles into 3 groups of 3 marbles each.

Take any 2 groups and place them on each pan. If they balance, remove the marbles from the pans, & place any 2 of the marbles from the remaining unweighed group on the pans, 1 on each pan.

If one is heavier, it is the heavier marble, but if they balance, the remaining unweighed marble is the heavier one.

If your first weighing does not balance, remove the marbles from the lighter pan, & place 1 marble on each pan from the heavier pan. The heavier 1 is the 1.5 ounce marble, but if they balance, then the marble from the heavy pan from the first weighing that was not weighed in the second weighing is the heavy 1.
Once a week a wagon driver leaves his hut and drives his wagon to the river dock to pick up supplies for his town. At 4:05 PM, one-fifth of the way to the dock, he passes the Temple. At 4:15 PM, one-third of the way, he passes the Preetam-Da-Dhabaa.

At what time does he reached the dock?

Answer

5:05 PM

At 4:05 PM, the wagon driver passes the temple, one-fifth of the way to the dock. Also, at 4:15 PM, he passes the Preetam-Da-Dhabaa, one-third of the way. Thus, he travels 2/15 (1/3 - 1/5) of the distance in 10 minutes.

At 4:15 PM, he has already travelled 1/3 of the distance. Thus 2/3 of the way is remaining, which can be travelled in
= ( (2/3) * 10 ) / (2/15)
= 50 minutes

At 4:15, he was at Preetam-Da-Dhabaa.and remaining way will take 50 more minutes. Hence, the driver will reach at 5:05 PM to the dock.
    Brain Teaser No : 00115

Four prisoners escape from a prison.
The prisoners, Mr. East, Mr. West, Mr. South, Mr. North head towards different directions after escaping.
The following information of their escape was supplied:
 The escape routes were North Road, South Road, East Road and West Road
 None of the prisoners took the road which was their namesake
 Mr. East did not take the South Road
 Mr.West did not the South Road
 The West Road was not taken by Mr. East
What road did each of the prisoners take to make their escape
Answer

Put all the given information into the table structure as follow:
     North Road    South Road    East Road    West Road
Mr. North    No               
Mr. South         No          
Mr. East         No    No    No
Mr. West         No         No

Now from table, two things are obvious and they are:
 Mr.North took the South Road
 Mr.East took the North Road
Put this information into the table, Also keep in mind that the prisoners head towards different directions after escaping.
     North Road    South Road    East Road    West Road
Mr. North    No    YES    No    No
Mr. South    No    No          
Mr. East    YES    No    No    No
Mr. West    No    No         No

Now from the table:
 Mr.West took the East Road
 Mr.South took the West Road
So the answer is:
 Mr.North took the South Road
 Mr.South took the West Road
 Mr.East took the North Road
 Mr.West took the East Road

Shahrukh speaks truth only in the morning and lies in the afternoon, whereas Salman speaks truth only in the afternoon and lies in the morning.

A says that B is Shahrukh.

Is it morning or afternoon and who is A - Shahrukh or Salman?
Answer

It is Afternoon and A can be Salman or Shahrukh. If A is Salman, he is speaking truth. If A is Shahrukh, he is lying.

Want to confirm it? Consider following 4 possible answers and check for its truthness individually.
1. It is Morning and A is Shahrukh
2. It is Morning and A is Salman
3. It is Afternoon and A is Shahrukh
4. It is Afternoon and A is Salman

A rich man died. In his will, he has divided his gold coins among his 5 sons, 5 daughters and a manager.

According to his will: First give one coin to manager. 1/5th of the remaining to the elder son. Now give one coin to the manager and 1/5th of the remaining to second son and so on..... After giving coins to 5th son, divided the remaining coins among five daughters equally.

All should get full coins. Find the minimum number of coins he has?
Answer

We tried to find out some simple mathematical method and finally we wrote small C program to find out the answer. The answer is 3121 coins.

Here is the breakup:
First son = 624 coins
Second son = 499 coins
Third son = 399 coins
Forth son = 319 coins
Fifth son = 255 coins
Daughters = 204 each
Manager = 5 coins
There is a grid of 20 squares by 10 squares. How many different rectangles are possible?

Note that square is a rectangle.
Answer

11550

The Generic solution to this is:
Total number of rectangles = (Summation of row numbers) * (Summation of column numbers)

Here there are 20 rows and 10 columns or vice versa. Hence, total possible rectangles
= ( 20 + 19 + 18 + 17 + 16 + .... + 3 + 2 + 1 ) * ( 10 + 9 +8 + 7 + .... + 3 + 2 + 1)
= ( 210 ) * (55)
= 11550

Hence, total 11,550 different rectangles are possible.

If you don't believe it, try formula on some smaller grids like 4x2, 3x2, 3x3 etc...
If A+B=C, D-C=A and E-B=C, then what does D+F stands for? Provide your answer in letter terms as well as in number terms.
Submitted by : David
Answer

J or 10

A simple one.

Assume that each character represents the number equivalent to the position in the alphabet i.e. A = 1, B = 2, C = 3, D = 4 and so on. Now let's check our assumption.

A + B = C i.e. 1 + 2 = 3
D - C = A i.e. 4 - 3 = 1
E - B = C i.e. 5 - 2 = 3

Thus, our assumption was Correct. Hence, D + F = J i.e. 4 + 6 = 10
A woman took a certain number of eggs to the market and sold some of them.

The next day, through the industry of her hens, the number left over had been doubled, and she sold the same number as the previous day.

On the third day the new remainder was tripled, and she sold the same number as before.

On the fourth day the remainder was quadrupled, and her sales the same as before.

On the fifth day what had been left over were quintupled, yet she sold exactly the same as on all the previous occasions and so disposed of her entire stock.

What is the smallest number of eggs she could have taken to market the first day, and how many did she sell daily? Note that the answer is not zero.
Submitted
Answer

She took 103 eggs to market on the first day and sold 60 eggs everyday.

Let's assume that she had N eggs on the first day and she sold X eggs everyday. Putting down the given information in the table as follow.
Days    Eggs at the start of the day    Eggs Sold    Eggs Remaining
Day 1    N    X    N-X
Day 2    2N-2X    X    2N-3X
Day 3    6N-9X    X    6N-10X
Day 4    24N-40X    X    24N-41X
Day 5    120N-205X    X    120N-206X

It is given that she disposed of her entire stock on the fifth day. But from the table above, the number of eggs remaining are (120N-206X). Hence,
120N - 206X = 0
120N = 206X
60N = 103X

The smallest value of N and X must be 103 and 60 respectively. Hence, she took 103 eggs to market on the first day and sold 60 eggs everyday.
John lives in "Friends Society" where all the houses are in a row and are numbered sequentially starting from 1. His house number is 109.

Jessy lives in the same society. All the house numbers on the left side of Jessy's house add up exactly the same as all the house numbers on the right side of her house.

What is the number of Jessy's house? Find the minimal possible answer.
Answer

There are 288 houses and Jessy's house number is 204.

Let's assume that in the "Friends Society" there are total N houses numbered from 1 to N and Jessy's house number is X.

Now it is given that all the house numbers on the left side of Jessy's house add up exactly the same as all the house numbers on the right side of her house. Hence,
1 + 2 + 3 + ..... + (X-1) = (X+1) + (X+2) + (X+3) + ..... + N

Both the sides of the above equations are in A.P. Hence, using A.P. summation formaula,

[(X-1)/2][2*(1) + (X-1-1)] = [(N-X)/2][2*(X+1) + (N-X-1)]
[X-1][(2) + (X-2)] = [N-X][(2X+2) + (N-X-1)]
(X-1)(X) = (N-X)(N+X+1)
X2 - X = N2 + NX + N - NX - X2 - X
X2 = N2 + N - X2
2X2 = N2 + N
X2 = (N2 + N)/2
X2 = N(N+1)/2

Now, using Trial and Error method to find values of N and X such that above equation is satisfied, we get
1. N = 8, X = 6
2. N = 49, X = 35
3. N = 288, X = 204
4. N = 1681, X = 1189
5. N = 9800, X = 6930
But we require minimal possible answer and it is given that John's house number is 109. It means that there are atleast 109 houses. Hence, first two are not possible. And the answer is : there are 288 houses and Jessy's house number is 204.
Makayla had $1.19 in change. None of the coins was a dollar.

Nicole ask her for change for a dollar, but Makayla could not make change.

What coins did she have?
Submitted
Answer

As it is given that Makayla had $1.19, it means she would have four pennies. Now, the remaining $1.15 in coins must not add up for exactly a dollar. Therefore she would not have 4 quarters or 2 quarters and 5 dimes. But she would have either 1 quarter or 3 quarters. Hence, there are 2 solutions.

Solution I
1 Quarter, 9 Dimes, 4 Pennies (0.25 + 0.90 + 0.04 = $1.19)

Solution II
3 Quarters, 4 Dimes, 4 Pennies (0.75 + 0.40 + 0.04 = $1.19)
A group of friends went on a holiday to a hill station. It rained for 13 days. But when it rained in the morning, the afternoon was lovely. And when it rained in the afternoon, the day was preceded by clear morning.

Altogether there were 11 very nice mornings and 12 very nice afternoons. How many days did their holiday last?
Answer

The holiday last for 18 days.

Let's assume the number of days as follows:
Rain in the morning and lovely afternoon = X days
Clear morning and rain in the afternoon = Y days
No rain in the morning and in the afternoon = Z days

Number of days with rain = X + Y = 13 days
Number of days with clear mornings = Y + Z = 11 days
Number of days with clear afternoons = X + Z = 12 days

Solving above 3 equations, we get X = 7, Y = 6 and Z = 5

Hence, total number of days on holiday = 18 days
    Brain Teaser No : 00299

Substitute digits for the letters to make the following Division true
                  Y F Y

             -----------

        A Y | N E L L Y

            | N L Y

        ----------------

                P P L

                P N H

              ----------

                  N L Y

                  N L Y

              ----------

                  0 0 0
Note that the leftmost letter can't be zero in any word. Also, there must be a one-to-one mapping between digits and letters. e.g. if you substitute 3 for the letter N, no other letter can be 3 and all other N in the puzzle must be 3.
Submitted by : Calon

Answer

See the pattern of the Y. AY * Y = NLY i.e. Y is multiplied by Y and the last digit of the answer is also Y. Thus, the value of Y would be 5 or 6.

Also,
H=0 as L - H = L
P = 2N as P - N = N
L - Y = P = 2N
E - L = p

Let's find out the minimum possible values. If N=1, then P=2, Y=5, L=7 and E=9. Note that the value of Y can not be 6 as it makes L=8 and E=10 which is not possible. Hence, Y=5, N=1, P=2, L=7, E=9, H=0

Now, using trial-n-error or rather solving F*AY=PNH, we get F=6 and A=3.

             5 6 5                    Y F Y

       -----------              -----------

   3 5 | 1 9 7 7 5          A Y | N E L L Y

       | 1 7 5                  | N L Y

       -----------              -----------

         2 2 7                    P P L

         2 1 0                    P N H

       -----------              -----------

           1 7 5                    N L Y

           1 7 5                    N L Y

       -----------              -----------

           0 0 0                    0 0 0

Technical Blogs..

Jokes & Fun
GDI+
Ado.Net Tutorial
Asp.Net Tutorial
Lectures videos
Winform Tutorial
C#.Net Tutorial
Programming Tips And Tricks
Visual C++ Tutorial
Ado.net Tutorial
ActiveX Controls Tutorial
ATL COM Tutorial
COM Tutorial
Managed C++The Buddha And His Dhamma
Bea WebLogic Interviews
TCL Programming FAQ's
Computer Science Notes
Discrete Mathematics notes
Database Management System(DBMS) Faqs
Professional Practices Faqs
Lotus Notes Faqs
Beautiful advertisements
Programming interview Questions and answers Blog List
Human Resource Tips
Tips for Windows XP Systems
Tips for Internet and Computer users
Tips for better e-mail etiquette
JavaScript Faq's
VB Script FAQ's
HTML Faq's
Perl Scripting FAQ's
Winrunner Faq'sLinux FAQ's
CCNA cisco Certification
Data WareHousing Interview
Microsoft SharePoint Interview
C++ Interview
Siebel Customer Relationship Management FAQ's
C Programming Language- Step by step learning
Unix FAQ'sSample Source Code for all languages
Various Technical and academic certifications

Source Code

Certifications

Misceleneous technical Faq's

VC++  Blog

Data structures Blog

.Net Blog

C#.Net Blog

VB.Net Blog

ASP.Net Blog

ADO.Net Blog

Winform Blog

WCF / WPF Blog

Job Openings

Operating Systems Faqs

Sybase Faq's

Download free e-books

All scripting Faq's

Oracle Faq's

All technical Faq's

Hasya-Vyang hindi kavite

HR, Car, Finance Faq's

Finance and Investment Faq's

All Freshers Resources

All Placement Papers

QA and testing Faq's

Sql Server Faq's

Interview Puzzles

Mainframes Faq's

Java Faq's

Sap Faq's