Given a grid 'heights', a path's effort is the maximum absolute height difference between consecutive cells along it. Return the minimum effort to travel from the top-left cell to the bottom-right cell, moving 4-directionally. The input is JSON {heights}.
Input: JSON {heights}.
Output: Integer — the minimum effort.
Input: {"heights":[[1,2,2],[3,8,2],[5,3,5]]}
Output: 2
Explanation: Route along the right keeps differences <= 2.Input: {"heights":[[1]]}
Output: 0
Explanation: No movement needed.Input: {"heights":[[1,2,3],[3,8,4],[5,3,5]]}
Output: 1
Explanation: A path with max difference 1 exists.1<=rows,cols<=100