Interview Question: Antsy Optimization

Sample Question #246 (brainteaser)
 
An ant sits in a corner of a cubic room (where the sides are all equal). The ant wants to climb to the exact opposite corner of the room. What’s the shortest path?
This entry was posted in Sample Qs. Bookmark the permalink.

1 Response to Interview Question: Antsy Optimization

  1. Brett says:

    ANSWER
     
    The question is easily answered if you imagine flattening the cube. The shortest path is a straight line from the origin corner to the destination corner. Draw this on a piece of paper and you’ll see the answer. (Bonus question: can you calculate the length of the ant’s path?)
     

Leave a comment