算法题
LRU
1 | class LRUCache: |
回溯算法,回文
1 | class Solution: |
堆,第k大
1 | import heapq |
1 | list(heapq.merge([1, 3, 5], [2, 4, 6])) # [1, 2, 3, 4, 5, 6] |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments
LRU
1 | class LRUCache: |
回溯算法,回文
1 | class Solution: |
堆,第k大
1 | import heapq |
1 | list(heapq.merge([1, 3, 5], [2, 4, 6])) # [1, 2, 3, 4, 5, 6] |