12 2018 档案

摘要:696. Count Binary Substrings 阅读全文
posted @ 2018-12-07 13:21 热之雪 阅读(313) 评论(0) 推荐(0)
摘要:前序非递归遍历 中序非递归遍历 后序非递归遍历 要保证根结点在左孩子和右孩子访问之后才能访问,因此对于任一结点P,先将其入栈。如果P不存在左孩子和右孩子,则可以直接访问它;或者P存 在左孩子或者右孩子,但是其左孩子和右孩子都已被访问过了,则同样可以直接访问该结点。若非上述两种情况,则将P的右孩子和左 阅读全文
posted @ 2018-12-06 18:07 热之雪 阅读(324) 评论(0) 推荐(0)
摘要: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.递增 思路:贪心思想,找异常值,存在两 阅读全文
posted @ 2018-12-06 11:19 热之雪 阅读(163) 评论(0) 推荐(0)
摘要:563. Binary Tree Tilt 566. Reshape the Matrix 572. Subtree of Another Tree 581. Shortest Unsorted Continuous Subarray 594. Longest Harmonious Subseque 阅读全文
posted @ 2018-12-04 09:37 热之雪 阅读(269) 评论(0) 推荐(0)