You are given with two ropes with variable width. However if we start burning both the ropes, they will burn at exactly same time i.e. an hour. The ropes are non-homogeneous in nature. You are asked to measure 45 minutes by using these two ropes.
How can you do it?
Please note that you can’t break the rope in half as it is being clearly stated that the ropes are non-homogeneous in nature.
All you have to do is burn the first rope from both the ends and the second rope from one end only simultaneously. The first rope will burn in 30 minutes (half of an hour since we burned from both sides) while the other rope would have burnt half. At this moment, light the second rope from the other end as well. Where, the second rope would have taken half an hour more to burn completely, it will take just 15 minutes as we have lit it from the other end too.
Thus you have successfully calculated 30+15 = 45 minutes with the help of the two given ropes.
There are 100 doors. 100 strangers have been gathered in the adjacent room. The first one goes and opens every door. The second one goes and shuts down all the even numbered doors – second, fourth, sixth... and so on. The third one goes and reverses the current position of every third door (third, sixth, ninth… and so on.) i.e. if the door is open, he shuts it and if the door is shut, he switches opens it. All the 100 strangers progresses in the similar fashion.
After the last person has done what he wanted, which doors will be left open and which ones will be shut at the end?
Think deeply about the door number 56, people will visit it for every divisor it has. So 56 has 1 & 56, 2 & 28, 4 & 14, 7 & 8. So on pass 1, the 1st person will open the door; pass 2, 2nd one will close it; pass 4, open; pass 7, close; pass 8, open; pass 14, close; pass 28, open; pass 56, close.
Thus we can say that the door will just end up back in its original state for each pair of divisor. But what about the cases in which the pair of divisor has analogous number for example door number 16? 16 has the divisors 1 & 16, 2 & 8, 4&4. But 4 is recurrent because 16 is a perfect square, so you will only visit door number 16, on pass 1, 2, 4, 8 and 16… leaving it open at the end. So only perfect square doors will remain open at the end.
You have been given three jars of 3 liters, 5 liters and 8 liters capacity out of which the 8 liters jar is filled completely with water. Now you have to use these three jars to divide the water into two parts of 4 liters each.
How can you do it making the least amount of transfers?
In front of you, there are 9 coins. They all look absolutely identical, but one of the coins is fake. However, you know that the fake coin is lighter than the rest, and in front of you is a balance scale. What is the least number of weightings you can use to find the counterfeit coin?
The answer is 2. First, divide the coins into 3 equal piles. Place a pile on each side of the scale, leaving the remaining pile of 3 coins off the scale. If the scale does not tip, you know that the 6 coins on the scale are legitimate, and the counterfeit is in the pile in front of you. If the scale does tip, you know the counterfeit is in the pile on the side of the scale that raised up. Either way, put the 6 legitimate coins aside. Having only 3 coins left, put a coin on each side of the scale, leaving the third in front of you. The same process of elimination will find the counterfeit coin.
We all know that New Year occurs after a week from Christmas and thus it falls on the same day as of Christmas. But this will not happen in 2050. In 2050, Christmas will appear on Sunday while New Year will appear on Saturday.
Read the question carefully again. New Year do falls after Christmas but that happens if two different years. The question is put up against the year 2050 and thus there will be 51 weeks and 2 days in between them as New Year will appear on 1 January 2050 and Christmas will happen on 25 December 2050.
Set the first switches on for abt 10min, and then switch on the second switch and then enter the room.
Three cases are possible
1.Bulb is on => second switch is the ans
2.Bulb is off and on touching bulb , you will find bulb to be warm
=>1st switch is the ans.
3.Bulb is off and on touching second bulb , you will find bulb to be normal(not warm)
=>3rd bulb is the ans.
This is a famous probability puzzle in which you have to choose the correct answer at random from the four options below.
Can you tell us whats the probability of choosing correct answer in this random manner.
Select 01-Select All Given a City table, whose fields are described
as +-------------+----------+ |
Field | Type | +-------------+----------+ |
ID | int(11) | |
Name | char(35) | |
CountryCode | char(3) | |
District | char(20) | |
Population | int(11) | +-------------+----------+ write a query that will fetch all columns for every row in the
table. My Solution SELECT*FROM city; --------------------------------------------------------------------------------- 02-Select by ID Given a City table, whose fields are described