Min Time Visiting Disappearing Points

Each point on a plane has a deadline after which it disappears. Starting at (0,0), find the earliest time each point can be visited or return -1 if impossible. Use Manhattan distance with greedy sorting by deadline.

Examples
Input: [[1,2,5],[3,4,10],[2,1,3]]
Output: [3,7,-1]
Hints

Min Time Visiting Disappearing Points

Each point on a plane has a deadline after which it disappears. Starting at (0,0), find the earliest time each point can be visited or return -1 if impossible. Use Manhattan distance with greedy sorting by deadline.