Questions › Technical PM › Top-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.
- Technical PM
- Top-Interview
- Hard
- 15 min
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
- Technical PM
- Structured problem solving
- Communication
- Trade-off reasoning
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.
Related Technical PM questions
- What are the different types of machine learning?Top-Interview · Technical PM · Hard
- How would you upgrade 5000 servers?Top-Interview · Technical PM · Hard
- Design a scalable system for a token-generation service used by an LLM that needs to handle up to 100,000 requests per second.Top-Interview · Technical PM · Hard
- What are the risks of assuming LLMs think or feel like humans?Top-Interview · Technical PM · Hard
- What's your approach to question engineering?Top-Interview · Technical PM · Hard
- How do you stay up-to-date with the latest developments in AI?Top-Interview · Technical PM · Hard
All Technical PM questions · Product manager interview questions by skill area