Available question text
Given an m x n grid with impassable cells (0), empty cells (1), and trees (>1) with distinct heights, find the minimum number of 4-directional steps starting from (0,0) to cut all trees in strictly increasing height order (cutting a tree turns its cell to 1), or return -1 if any tree is unreachable. The core challenge is computing and summing shortest-path distances between successive trees in height order (typically via repeated BFS/A*).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 675. Cut Off Trees for Golf Event
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source