摘要:
1、530 二叉搜索树中的最小绝对差 思路: 二叉搜索树 ==> 中序遍历 ==> 有序序列 代码 class Solution { private int res = Integer.MAX_VALUE; private TreeNode pre;//记录前一个结点 public void tra 阅读全文
摘要:
1、leetcode503 下一个更大元素Ⅱ class Solution { public int[] nextGreaterElements(int[] nums) { int[] res = new int[nums.length]; Arrays.fill(res, -1); Deque<I 阅读全文