![]() Start burning the x_prev minutes as we burn the next rope from 2 ends.This means we can achieve abs( x - x_prev ) minutes. Start burning the x_prev minutes as we burn the next rope from 1 end.This means we can achieve x_prev + x/2 minutes. Wait for the whole x_prev minutes to expire, then burn the next rope from 2 ends.This means we can achieve x_prev + x minutes. Wait for the whole x_prev minutes to expire, then burn the next rope from 1 end.Then, consider what happens if we add the n+1th rope. Now, suppose it is possible to measure x_prev minutes with n ropes. We can start with a base state of 1 rope yields x minutes or x/2 minutes. I might have overlooked something, so be wary even if it seems to make sense. Well, here is my attempt to solve the problem with greater efficiency. until n = 0 (All ropes finished burning)įor n = 2 and x = 60, I've found that the following time period can be measured: 30, 60, 90, 120, 45 and 15.Īs suggested, I posted the question on cs.: Repeat the step 1 argument with x + y + z = n - 1 (with constraints imposed on x, y, and z since some ropes are still burning and we cannot set the fire off) and add all the newly generated cases to the stack/queue. ![]() Now we have another scenarios with certain amount of ropes that are being burnt. Output the time that has passed (calculated based on how long the finished rope has burnt, and which ends were burnt at what time). ![]() For each item in the stack/queue, determine how many minutes have passed when there is a rope finishes burning.Consider all possible cases for x, y and z and add those cases to a stack/queue. We have x + y + z = n and that x,y,z are positive integers and z != 0. Let number of ropes that will not be burnt at this stage be x, number of ropes that will be burnt one end be y, and number of ropes that will not be burnt at all be z. For a given rope, we have choices either to burn both ends, one end, or not burning the rope at all. Start at minute 0, we have n ropes, each takes x minutes to burn.I imagine the solution to this would involve dynamic programming, but I am not quite sure. Of course my aim would be finding an algorithm with minimal complexity. (burning one end of the rope), or 30 minute period (burning both ends Using these n ropes, what time quantity can you measure?įor example, with n = 1 and x = 60, I can measure 60 minute period But the ropes have different densities at different points, so There are n ropes, each rope takes x minutes toīurn (for simplicity assume x is positive integer). How do you use these two ropes to measure 45 minutes? There’s no guarantee of consistency in the time it takes different But either rope has different densities at different points, so ![]() Original question: There are two ropes, each rope takes 1 hour toīurn. All this for only $.99 is hard to beat, so I look forward to hearing your thoughts! Good Points:ġ.Generalized from a technical interview question: Finally, the inclusion of medals gives more replay value to puzzle fans. The tilt-based controls are responsive but can become tiring after a few rounds. The mood of the game is also dim and shadowy but in the grand scheme of things, the developers did a good job of matching the graphics to the overall concept of the game.īurn the Rope presents over 80 different levels, which should give you more than enough game play. The background of the stages features similar yet slightly diverse dark wood patterns. Lastly, spiders will make spider webs that will allow you to burn those hard to reach areas. Secondly, colored beetles will be placed in difficult locations but when burned (again with the same colored flame) will give you more points to hopefully obtain a better medal. First, colored rope will make its way in and can only be burned by blazing a colored ant of the corresponding color. I always welcome medals or stars in puzzle games as it adds a lot more game value and makes you go back to try a different methods in order to get a better score.ĭuring the game you will come across a few challenges in the form of insects that will really fire things up. Awarded medals will depend entirely on how much rope was burned. Once you finish the level you will be rewarded with either a bronze, silver or gold medal. The accelerometer will primarily act as your controls so be prepared to wave your iPhone like Harry Potter’s wand to keep that fire burning! Your goal is to burn as much or all of the rope without the fire flickering out. In Burn the Rope you will have a rope that is curled and twisted in many different shapes and sizes. Burn the Rope (iTunes Link) was developed by Big Blue Bubble and is a game that presents puzzle solving in a very unique way.
0 Comments
Leave a Reply. |