随笔分类 - Leetcode总结
摘要:DFS: Topological sort:
阅读全文
摘要:When we see ordering, consider stack. When we process item one by one, but I can't process current item, we move to next item (and that item might dep
阅读全文
摘要:When to use binary search: * 我们知道解空间在一个区间 [i,j] * valid解是解空间的一个点(也可以看作是只有一个点的range)或者一个range的起始点或者结束点 * range之外的点都不是valid解 想法一般都两种: * 直接找到解 (比如classic
阅读全文
摘要:https://www.programcreek.com/2013/08/leetcode-problem-classification/ https://medium.com/algorithms-and-leetcode https://medium.com/@sourabreddy
阅读全文
浙公网安备 33010602011771号