Code
Code
530.
class Solution {
int prev = Integer.MAX_VALUE;
int ans = Integer.MAX_VALUE;
public int getMinimumDifference(TreeNode root) {
inOrder(root);
return ans;
}
200.
public class Solution {
public int numIslands(char[][] grid) {
int count = 0;
grid[i][j] = '0';
clearRestOfLand(grid, i + 1, j);
clearRestOfLand(grid, i - 1, j);
clearRestOfLand(grid, i, j + 1);
clearRestOfLand(grid, i, j - 1);
return;
}
}