Interview Experience
Problem You are given a 2D grid representing an ancient tomb. Each cell is one of: '.' — open path '#' — wall 'T' — trap (costs 2 moves to pass through) 'G' — gold (must be collected on the way) Find the minimum-cost path from the top-left (0,0) to the bottom-right (n-1, m-1) that collects all gold cells. Return -1 if no such path exists. Example Follow-ups What if gold has individual point values and you want to maximize score within a move budget? How does the complexity change as the number o…
Full Details
🔒
Unlock all Karat questions
Full insider details, leaked discussions, and candidate experiences.
or every company, $100/year →About This Question
This is a candidate experience report from a karat interview.