This question evaluates a candidate's understanding of graph traversal concepts, grid-based state propagation, and reachability analysis in time-evolving systems.
Given an m×n grid representing kitchen cells: 0 for empty, 1 for fresh fruit, and 2 for spoiled fruit. Each minute, any fresh fruit adjacent (up, down, left, right) to a spoiled fruit becomes spoiled. Return the minimum number of minutes needed to spoil all fresh fruits, or -1 if it is impossible. Describe your algorithm, prove correctness at a high level, and analyze time and space complexity. Implement a function that computes the answer.