PMMockr

QuestionsTechnical PMTop-Interview

Given a matrix with a rat, bread, cat, and obstacles, find a path from the rat to the bread that maximizes the minimum distance from cat.

Focus on breaking down the problem into manageable components. Start by clearly defining the elements of the matrix: the rat's starting position, the bread's location, the cat's position, and any obstacles. Discuss potential algorithms for pathfinding, such as breadth-first search or Dijkstra's algorithm, and how you would adapt them to not only find a path but also to evaluate the minimum distance from the cat at each step. Emphasize the importance of considering all possible paths and how to prioritize those that maximize the distance from the cat. Finally, outline how you would handle edge cases, such as when the cat is adjacent to the rat or when there are no valid paths to the bread.

What this question tests

Practise this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.

Start a timed mock interview

Related Technical PM questions

All Technical PM questions · Product manager interview questions by skill area