240 发简信
IP属地:加州
  • Leetcode 964.Least Operators to Express Number

    Well, we can also solve in dp format.Python3

  • Leetcode 962. Maximum Width Ramp

    Intuition:Keep a decresing stack.For each number,binary search the first...

  • LeetCode 961. N-Repeated Element in Size 2N Array

    [C++/Java/Python] 4 lines O(1) O(1) Solution 1 Use array or set and retu...

  • Leetcode 947 Most Stones Removed with Same Row or Column

    1. 数岛屿问题 如果两个石头在同行或者同列,两个石头就是连接的。连在一起的石头,可以组成一个连通图。每一个连通图至少会剩下1个石头。所以我们希...

  • LeetCode 940 Distinct Subsequences II

    嗯这里更具体讲一讲,思路是怎么一步一步想的。 最开始的思路是用Trie来表示所有可能subseq.遍历string S,对Trie中每个节点新建...

    0.4 9469 3 20 1
  • Leetcode 936 Stamping The Sequence

    leetcode有很多国人用户,尝试一个新的方式分享答案。方便大家评论,提问,互动,打赏。作为尝试,是不是应该选一个言简意赅的题目... Sub...

    0.5 2647 2 11 3