Skip to main content
22 events
when toggle format what by license comment
Feb 8, 2016 at 17:23 comment added Simen S The funny thing is that I know of some "inexpensive developers" who provided your description above and the three test cases would send me the following code: public int TravelOnLineSegment() { return 12; }
Jun 15, 2015 at 16:17 history edited durron597 CC BY-SA 3.0
Removed unnecessarily language and [interview] tag
Feb 22, 2013 at 18:04 comment added Sean McSomething Do objects exist at all points or just the given ones? Is it possible to have multiple objects at a given location? Is it allowable to temporarily set an object down in a location other than its final one?
Feb 22, 2013 at 17:41 answer added alexis timeline score: 4
Feb 22, 2013 at 17:32 comment added alexis When you come to a choice point, always transport the piece of cargo with the smallest destination. That'll ensure that by the time you've dispatched both, you're as far to the right as possible.
Feb 10, 2013 at 17:09 vote accept david
Feb 10, 2013 at 17:09
Feb 10, 2013 at 8:25 comment added elssar @supersam654 that is pretty good actually. Just one problem - what happens in test case 2? Could solve that by having a flag that decides the direction when you have no cargo and change it when we encounter a package when moving right, that needs to be moved right.
Feb 10, 2013 at 7:09 history tweeted twitter.com/#!/StackProgrammer/status/300501817207451648
Feb 10, 2013 at 6:45 answer added Loren Pechtel timeline score: 0
Feb 10, 2013 at 4:06 history post merged (destination)
Feb 10, 2013 at 3:53 comment added supersam654 This sounds really nieve, but what if you start by moving to the right until you hit a piece of cargo. Once you hit that cargo, drop whatever you are carrying, pick up that cargo, and proceed to place it in the right spot. If you hit another piece of cargo that needs to be moved, drop the current, pick it up, and deal with it. When you have no cargo, move right.
Feb 10, 2013 at 3:44 comment added yannis We can move questions between sites automatically (even if they are closed), please do not cross post. Instead, follow @ratchetfreak's advice, flag for moderation attention and ask for the question to be migrated.
S Feb 10, 2013 at 2:29 history edited user28988 CC BY-SA 3.0
Linked picture properly.
Feb 10, 2013 at 2:29 comment added ratchet freak you can still flag and if the mod agrees he will reopen and migrate
Feb 10, 2013 at 2:22 review Suggested edits
S Feb 10, 2013 at 2:29
Feb 10, 2013 at 2:12 history edited user7007 CC BY-SA 3.0
deleted 96 characters in body
Feb 10, 2013 at 2:06 review First posts
Feb 10, 2013 at 2:12
Feb 10, 2013 at 1:47 history asked david CC BY-SA 3.0
Feb 9, 2013 at 21:36 answer added MSN timeline score: -1
Feb 9, 2013 at 21:05 answer added BlackBear timeline score: 1
Feb 9, 2013 at 20:55 answer added user10326 timeline score: 0
Feb 9, 2013 at 20:51 comment added david If I'm not mistaken, wouldn't you need a datastructure to count the "overlap"? Otherwise I'm solving it the wrong way.