Cover image for Imagination Technologies
Logo

Imagination Technologies

Imagination Technologies

Add an Interview

Interview Question

Graduate RTL Hardware Design Engineer Interview

-

Imagination Technologies

There are 5 holes in a line, and there is a rat in one of it. Each turn the rat will move either left or right, but never stay in the same hole, and each turn you can check one hole. The holes are in a line so when the rat reach one end, it must move back in the next turn. What is your strategy to catch that rat?

Interview Answers

3 Answers

1

start with middle move to 2nd and check twice and move to 3rd and then 4th and check 4th twice.. right? OR you start anywhere just move sequentially and check 2nd and 4th place twice

Alexis on

0

middle to 2nd not needed

Alexis on

0

Keep checking middle one, worst case delay is 4 check, and you should find it by then!!

Answer on

Add Answers or Comments

To comment on this, Sign In or Sign Up.