|
1) Since you already know how long the rope is going to burn, what is there left to measure? And anyway, since you're burning the rope - what is the point of measuring it?
2) I don't see the difference between 3 or 2+1 or 1+1+1. Maybe your description of the problem is lacking some side conditions, or is inaccurate? Maybe you should view the problem at a different angle - say 90 degrees
|
|
|
|
|
On a more serious note: as incomplete and nonsensical as these questions seem, client specifications for a project are typically just as incomplete and nonsensical. Maybe the point of these questions was to query for more specific information to the point where the problem is sufficiently specified to actually come up with a solution?
|
|
|
|
|
Burning the rope is just an example of how you use time to measure it, not the only way permitted.
If you can measure time accurately in this experiment (which they don't specify) you could, for instance, test how far a shadow moves over it in an hour. With a bit of maths you can then angle it so that it takes an hour for a shadow to move from end to end, after which you can measure a quarter by checking where the shadow gets to after 15 mins. You'd have to do each round of testing at the same time of day but so what, it's not a real situation anyway.
Regards
Nelviticus
|
|
|
|
|
1) If all you can measure is time, climb a tower or building higher than the rope is long, hold the rope on one end, letting the other dangle down. Then let it drop and measure the time it takes until the far end hits the pavement. Then drop something small to take the time it takes to drop from the current height. From the latter you can determine the current height, from the former you can determine the drop height of the far end. The difference between the two heights is the rope length. (note: height is 1/2*a*t^2, where a is ~9.81m/s^2 and t is the time you measured)
You just need a sufficiently accurate stop watch and an accurate way to measure the moment the end of the rope hits the bottom (photo sensor should do)
When you're done, tell the client the length and sell the rope: if burning it is ok, then why would the client expect to get it returned?
And don't tell me I can't use gravity!
|
|
|
|
|
Actually the 1st is a bit of a trick question. The hint is in this line:
Rahul VB wrote: For example i set it on fire and the rope burns for one hour.
Did he actually state that the rope is 1 hour long and you must then divide it into a half hour- and another into a 3/4 hour rope?
I think this question is meant to find out how you read a problem. E.g. your measuring tool is time. And all you're being asked is to measure a rope of 30 min "long" and another of 45 min "long" ... i.e. start burning the rope while you start the measurement (i.e. something like a stopwatch). Then snuff the burning rope once it's reached the time indicated.
Now if you're required to end with a rope the same length as the specified time, you'd need at least 2 ropes (equal lengths) to achieve this. E.g. time how long the 1st burns, subtract the required left over rope from that time then burn the 2nd for that amount and snuff it.
|
|
|
|
|
Alternative to this (as others have mentioned) what if burning the rope is not necessarily the means of measuring it against time? Though here I might have to query on the translation, e.g. if the word rope is replaced with fuse the burning at a specified time interval makes a lot more sense than with a "rope".
Also, are you allowed to "invent" (or rather deduce) a new measurement from a sample? E.g. take a single rope, measure it using some other means (e.g. using a stick you picked up). Then time how long it takes to burn it. Then you can use maths to use the stick as non-destructive measure on other ropes.
And then, if the interviewer keeps giving you restrictions which void your answers. E.g. using mine above he then states: But you don't have 2 ropes. Or it's impossible to snuff. Etc. etc. ... that probably means he's actually testing your willingness to continue problem solving and how you react under pressure.
|
|
|
|
|
"Now i want to measure the rope for half an hour what to do?"
You burn it from both ends
They really will end up with expert pyromaniacs in that company.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
For 45 minutes, start fire at the 3/4 location. The question was not clearly defined purposely. Therefore, there is no definitive answer.
TOMZ_KV
|
|
|
|
|
|
Fire is just an example of one way of measuring the length of the rope.
So for example, tie one end of the rope to a tree and walk away for an hour... how long is the rope - ones hours length of walking long.
Go back to the tree and do the same for 30 minutes and 45 minutes, you've got 3 measurements.
It's a silly question, so I think silly answers are only fair.
|
|
|
|
|
This is the only answer that makes sense to me so far. You can measure pretty much any length multiple times this way. I think it is cool.
I would imagine if you could understand Morse Code, a tap dancer would drive you crazy.
[Mitch Hedberg (American Comedian, 1968-2005)]
|
|
|
|
|
|
You answer "African or European?" and then mention to the interviewer that you require a steady uninterrupted stream of "Skittles" delivered to your desk as you code. Interviews always respond favourably to developers with sugar addictions. Its not the capabilities, its the carbs....
|
|
|
|
|
No cut, no fold?
With the rope, wrap 1 turn, one end in contact with each other, if you set fire to any point of the rope, this will take 30 minutes to burn (1st response).
With the same rope, wrap 2 turns, each turn in contact with the other and the end in contact with the
other, if you put the fire at any point it would take 15 minutes to burn.
Separate one of the turns in keeping contact only at the end of the first round, set fire to the end of this offset turn which will take 30 min to burn and ignite the following turn which burns by the 2 ends during 15 minutes, therefore total 45 min. (2nd response). Is this not?
I don't understand the second problem, fire me!
|
|
|
|
|
1a. Fold in half and fire it up.
1b. Fold in half, fold one half in half, open the folded half and fire it up.
2. Move two from the bottom row up to the second row. Move the top one to the bottom.
This is not difficult. Or do I not understand?
|
|
|
|
|
Question 1:
Fold the rope in half for 30 minutes, fold once more and take 3 lengths of the rope to equal 45 minutes.
Question 2:
No clue for the next question. Can you reword it in away that doesn't show me that English isn't your first language?
|
|
|
|
|
Hello Brother,
Quote: Can you reword it in away that doesn't show me that English isn't your first language?
Firstly, dont try to be sarcastic, insults are not welcome here(You have just joined code project,learn to speak). If you read the post of other senior members you will notice how humble they are and what is the depth and power of their knowledge.
If you dint understand the question i apologize for that, i couldnt put it properly.And yes English is not my first language, i stay in India. My mother tongue is Hindi and i am proud of that.
With due respect, keeping aside all issues , its my mistake that i couldnt put that question properly.
I will rephrase it for you:
Just consider the figure in the second question as a triangle of balls/smilies. You need to invert the triangle. To do that you either have 3 moves or a combination of (2 + 1 ) moves.
The word "Move" means to pick up and place the ball in order to re-arrange the entire figure.
You either pick up 3 balls together, or first you pick up 2 balls and then one ball or vice versa.
Thanks a ton,
Rahul
|
|
|
|
|
I didn't try to be sarcastic, I succeeded.
Sorry we can't joke around on the internet. We might hurt peoples feelings.
|
|
|
|
|
OOPS,
I am so so so sorry brother. Actually i was very frustrated brother i couldn't think rationally. It happens sometimes when you dont crack an interview . I am so sorry brother i miss behaved with many people yesterday, even on code project.
For the last time please forgive me i was so rude...
By the way if you dont mind me asking: what do you do? i mean are you a student or a professional?
Thanks a ton,
Rahul
|
|
|
|
|
Don't be sorry, I was just joking again.
I take for granted how hard it is to convey sarcasm through text, let alone to a non-native English speaker.
I am a Software Engineer.
Also, I don't really see why you would be proud of your first language. I'm not proud I speak English, I'm just happy most other countries usually speak it(and that it became the common language of the internet) You didn't choose to speak it, so no reason to make it define you.
|
|
|
|
|
Yes completely I agree. I lost it yesterday .
Software engineer, thats good. So you are also lost in the world of computers . Hmmm Welcome to code project brother. Happy coding.
|
|
|
|
|
Sorry, have no idea how to respond. Fire is a non-linear process, a rope half the length may burn in 56 minutes or it may never burn because there isn't enough fuel to keep the fire burning until the rope is consumed.
If you hold your laptop upside down, you've rearranged the smilies as requested without moving any of them. (Not really, left/right orientation is swapped too.) The best I could do was 1 move of 1 and
|
|
|
|
|
So with the move last week I got all my old Lego('s) from the attic. The box says it's suitable for kids from 9 to 12. I guess they only put the suitable girl age on there, because we all know men love Lego to the end
That said, I must suppress the urge to get it out the box and start playing with it again. Must... Suppress... Urge...
|
|
|
|
|
Whatever you do, don't go up there and find your old train set.
That can start some very unhealthy addictions...
Train set[^]
Another train set[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Don't worry. I never had one
|
|
|
|