随笔分类 -  Leetcode总结

摘要:DFS: Topological sort: 阅读全文
posted @ 2018-05-07 10:31 JTechRoad 阅读(113) 评论(0) 推荐(0)
摘要:Use array. Use map. 阅读全文
posted @ 2018-05-05 09:13 JTechRoad 阅读(117) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-05-04 14:33 JTechRoad 阅读(160) 评论(0) 推荐(0)
摘要:When to use binary search: * 我们知道解空间在一个区间 [i,j] * valid解是解空间的一个点(也可以看作是只有一个点的range)或者一个range的起始点或者结束点 * range之外的点都不是valid解 想法一般都两种: * 直接找到解 (比如classic 阅读全文
posted @ 2018-05-01 08:32 JTechRoad 阅读(216) 评论(0) 推荐(0)
摘要:https://www.programcreek.com/2013/08/leetcode-problem-classification/ https://medium.com/algorithms-and-leetcode https://medium.com/@sourabreddy 阅读全文
posted @ 2018-04-30 15:18 JTechRoad 阅读(102) 评论(0) 推荐(0)