• 0
John

Interview Puzzle- "Fox in a hole"

Question

4 answers to this question

  • 0

Don't watch the video!!!

it is a good video, it clearly states the problem, but then it gives the answer! (Clearly stated as well)

if you watch the video, stop after the problem statement. 

I enjoy the problem, and I appreciated the ingenious solution, nice job!

0

Share this post


Link to post
Share on other sites
  • 0

The second half of the solution seems to be inefficient though.  Once we stop at hole 4 and conclude that the fox is in fact at an even hole the only hole left is hole number 2 which means that we don't need to start all over.  Simply inspecting three and then two would be enough to find the fox.

0

Share this post


Link to post
Share on other sites
  • 0

I think that after we check 4, we know that fox is in an odd number right now, and will move to an even one that night.

0

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, BMAD said:

The second half of the solution seems to be inefficient though.  Once we stop at hole 4 and conclude that the fox is in fact at an even hole the only hole left is hole number 2 which means that we don't need to start all over.  Simply inspecting three and then two would be enough to find the fox.

Exception which means it could be 4

check hole 2 fox is in  5

check hole 3 fox is in 4

check hole 4 fox is in 3

check hole 2 fox is back in 4

 

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.