12 2018 档案
摘要:前序非递归遍历 中序非递归遍历 后序非递归遍历 要保证根结点在左孩子和右孩子访问之后才能访问,因此对于任一结点P,先将其入栈。如果P不存在左孩子和右孩子,则可以直接访问它;或者P存 在左孩子或者右孩子,但是其左孩子和右孩子都已被访问过了,则同样可以直接访问该结点。若非上述两种情况,则将P的右孩子和左
阅读全文
摘要:665. Non-decreasing Array Input: [4,2,3] Output: True Explanation: You could modify the first 4 to 1 to get a non-decreasing array.递增 思路:贪心思想,找异常值,存在两
阅读全文
摘要:563. Binary Tree Tilt 566. Reshape the Matrix 572. Subtree of Another Tree 581. Shortest Unsorted Continuous Subarray 594. Longest Harmonious Subseque
阅读全文

浙公网安备 33010602011771号