手写代码 OJ 链接整理

整理一些需要记忆的手写代码的 OJ 链接,方便复习操练。

  1. 数组排序: https://leetcode.cn/problems/sort-an-array/

  2. 拓扑排序:https://leetcode.cn/problems/course-schedule-ii/

  3. 桶排序:https://leetcode.cn/problems/maximum-gap/

  4. 链表排序:https://leetcode.cn/problems/sort-list/

  5. 堆:

    1. https://leetcode.cn/problems/kth-largest-element-in-an-array/
    2. https://leetcode.cn/problems/sliding-window-median/
  6. KMP:

    1. 裸题:https://leetcode.cn/problems/implement-strstr/
    2. next 数组:https://leetcode.cn/problems/shortest-palindrome/
  7. 手写计算器:https://leetcode.cn/problems/basic-calculator-iii/

  8. 页面置换算法:

    1. LRU:https://leetcode.cn/problems/lru-cache/
    2. LFU:https://leetcode.cn/problems/lfu-cache/
  9. 高精度:

    1. 三次方根:https://www.acwing.com/problem/content/792/
    2. 字符串相乘:https://leetcode.cn/problems/multiply-strings/
    3. 分数到小数:https://leetcode.cn/problems/fraction-to-recurring-decimal/
  10. 黑帮火拼算法:

    1. https://leetcode.cn/problems/majority-element/
    2. https://leetcode.cn/problems/majority-element-ii/
  11. 多线程:

    1. 同步:https://leetcode.cn/problems/print-in-order/
    2. 哲学家就餐:https://leetcode.cn/problems/the-dining-philosophers/
    3. 交替打印:
      1. https://leetcode.cn/problems/print-foobar-alternately/
      2. https://leetcode.cn/problems/print-zero-even-odd/
      3. https://leetcode.cn/problems/fizz-buzz-multithreaded/
    4. 阻塞队列:https://leetcode.cn/problems/design-bounded-blocking-queue/
  12. 其他

    1. 质数筛选:https://leetcode.cn/problems/count-primes/
    2. 数字转英文:https://www.nowcoder.com/practice/1364723563ab43c99f3d38b5abef83bc
    3. 数字转中文:https://www.nowcoder.com/questionTerminal/6eec992558164276a51d86d71678b300
    4. 并查集:https://leetcode.cn/problems/number-of-provinces/
    5. Trie:https://leetcode.cn/problems/design-add-and-search-words-data-structure/
    6. 拒绝采样:https://leetcode.cn/problems/implement-rand10-using-rand7/
    7. 水塘抽样:https://leetcode.cn/problems/linked-list-random-node/
    8. 单调栈:https://leetcode.cn/problems/largest-rectangle-in-histogram/
    9. 单调队列:https://leetcode.cn/problems/sliding-window-maximum/
    10. 股票问题:
      1. https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-iv/
      2. 所有情况:https://labuladong.github.io/algo/3/26/94/