上一页 1 ··· 224 225 226 227 228 229 230 231 232 ··· 295 下一页
摘要: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/?tab=Description 下面这个解法里面的C++部分很好: https://discuss.leetcode.com/topic/28041/recurs 阅读全文
posted @ 2017-02-26 00:42 blcblc 阅读(385) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/patching-array/?tab=Description 好题目啊,下面的解法绝顶聪明: https://discuss.leetcode.com/topic/35494/solution-explanation 阅读全文
posted @ 2017-02-26 00:38 blcblc 阅读(156) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/sliding-window-maximum/?tab=Description 下面的解法真的非常巧妙。用了deque,然后模拟队列,始终只保持比当前之前更大的,因为当前之前更小的,是没有机会成为max的。 https://discuss. 阅读全文
posted @ 2017-02-26 00:22 blcblc 阅读(161) 评论(0) 推荐(0)
摘要: 题目: https://leetcode.com/problems/distinct-subsequences/?tab=Description 一般没有明显思路的情况下,都要想想DP,用下Divide-and-Conque 下面的思路很好,很清晰 https://discuss.leetcode. 阅读全文
posted @ 2017-02-26 00:05 blcblc 阅读(333) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/zqh_1991/article/details/52729203 阅读全文
posted @ 2017-02-25 23:51 blcblc 阅读(194) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/edit-distance/?tab=Description 真的非常好,也非常典型。 https://discuss.leetcode.com/topic/17639/20ms-detailed-explained-c-solutions 阅读全文
posted @ 2017-02-25 23:21 blcblc 阅读(631) 评论(0) 推荐(0)
摘要: 这是一个系列,层层加深难度。 http://www.cnblogs.com/grandyang/p/5203228.html 还是不错的,通过在两端增加新的数字,来判断。注意0也要继续叠加的,因为0可以存在数字的中间。 阅读全文
posted @ 2017-02-25 21:28 blcblc 阅读(193) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/grandyang/p/6108158.html http://www.cnblogs.com/grandyang/p/5880133.html 都是根据已有的条件,正和逆都保存起来,后续推导和处理。 阅读全文
posted @ 2017-02-25 20:18 blcblc 阅读(179) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/word-break/?tab=Description 以及 https://leetcode.com/problems/concatenated-words/?tab=Description 都很类似。用的都是DP,可以见: https: 阅读全文
posted @ 2017-02-25 19:50 blcblc 阅读(232) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/reverse-nodes-in-k-group/?tab=Description 解答: https://discuss.leetcode.com/topic/7126/short-but-recursive-java-code-with 阅读全文
posted @ 2017-02-25 11:54 blcblc 阅读(243) 评论(0) 推荐(0)
上一页 1 ··· 224 225 226 227 228 229 230 231 232 ··· 295 下一页