techInterview
Answers to technical interview questions - accepting donations for dogs

 
home
faq
reading
feedback
discuss
archive
fogcreek
bug tracking
pets in ny
petfinder



*new* techInterview bible


thank your brain
save a dog's life




 

Solved by michael

solution: dave's on fire

someone suggested he could dig a pit across the island to act as a firebreak. good suggestion, if he had a shovel and the ground wasn't too hard.

but even if he didn't have a shovel, he could pick up a branch and run up to the fire and light the branch. then run all the way to the eastern edge of the island, but stop about a mile short. there he could light all those trees on fire and they would start burning and the fire would move east. it would consume all that vegetation in an hour, and then dave could wait for awhile for that part to cool down some. when the initial fire reached him, he could just run into the already burnt part, and the fire couldn't get him.

T = tree
D = dave
B = burnt
 
top view
==========================
| fire-> T T T T T T T D |
==========================
 
dave gets branch and lights it from fire
==========================
| fire-> D T T T T T T T |
==========================
 
dave lights trees farther east on the island
==========================
| fire-> T T T T D fire->|
==========================
 
dave waits until second fire cools, and then hides out there
==========================
| B B B fire-> T T B B D |
==========================

dave is saved!


 



home | software development | bug tracking software | archive

[general software discussion] [dogs new york city] [Software Quality]