240 发简信
IP属地:华盛顿州
  • 310. Minimum Height Trees

    LeetCode Link 思路:按层剪掉 leaf nodes,当最终只剩一个或者两个 nodes,即为题解 可以使用 HashMap > m...

  • 169 Follow Up: 229. Majority Element II

    给定 array of integers, 返回个数多余 len/3 的 items要求: Linear Runtime, O(1) Space...

  • Resize,w 360,h 240
    169. Majority Element

    给定一个 array,输出超出半数的 item 一题多解,各种思路,面试热点问题。From 花花酱, 题解思路如下: Solution 1: H...

  • 238. Product of Array Except Self

    LeetCode Link下面的 Solution 可以 optimize to O(1) space: leftToRight as res ...

  • 236. Lowest Common Ancestor of a Binary Tree

    LeetCode Solution 1 Solution 2 with parent reference Solution 3 Find Two...

  • 207. & 210. Course Schedule I & II

    Course Schedulehttps://www.jianshu.com/p/341a09e86930 Course Schedule II...

  • 139. & 140. Word Break I & II

    Word Break:https://www.jianshu.com/p/c661daf51a01 Word Break IIhttps://w...

  • 78.& 90. Subsets I & II

    Given a set of distinct integers, nums, return all possible subsets (the...