240 投稿
收录了239篇文章 · 6人关注
  • 191. Number of 1 Bits

    Given a positive integer n, write a function that returns the number of ...

  • Quick Sort

    Common problems: start and end are modified during partitioning, so afte...

  • 146.LRU Cache

    Solve this problem incrementally, don't try to get to the optimal soluti...

  • 2022-07-16

    相向双指针 专题一 Two Sum Two Sum III - Data structure designhttps://leetcode.co...

  • [Week1]双指针算法

    Week1/2 刷题 (7.9 - 7.23) 复杂度理论与双指针算法入门 必须熟练掌握的两个排序算法 二分法 三种双指针算法 相向双指针(判断...

  • 1937. Maximum Number of Points with Cost

    参考的这个图解:https://leetcode.com/problems/maximum-number-of-points-with-cost...

  • 394. Decode String

    用两个stack,一个stack存repetition num(count), 一个stack存已经decode好的string. 几个keys...

  • 295. Find Median from Data Stream

    考到了,完全没反应过来。这里是用两个heap来保存stream里的数;max heap保存小的那一半,min heap保存大的那一半数。这样的话...

  • 572. Subtree of Another Tree

    我也不知道为什么一开始把isSame无脑简化为s == t这样了?判断两颗树是否相等其实是另外一道题100. Same Trees == t 意...

  • 凡事谨慎留备份

    不小心误删了fb代码文件夹,倒是在微信文件小助手有,可是后来自己新打进去的代码不见了,以后还是不管什么代码在简书发一发吧,不然很费事儿。