上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 233 下一页
摘要: https://leetcode.com/problems/search-in-rotated-sorted-array/?tab=Description 很好的很经典的题目。今天复习了一下。之前的思路虽然有了,但是对于相等的数字的处理很复杂,容易出错。今天看到了一个很好的解法。 https://d 阅读全文
posted @ 2017-02-26 12:07 blcblc 阅读(666) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/russian-doll-envelopes/?tab=Description 包信封问题,可以转化成最长有序子序列问题,见下面的分析: https://discuss.leetcode.com/topic/47469/java-nlogn 阅读全文
posted @ 2017-02-26 01:17 blcblc 阅读(250) 评论(0) 推荐(0)
摘要: 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 阅读(372) 评论(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 阅读(151) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/sliding-window-maximum/?tab=Description 下面的解法真的非常巧妙。用了deque,然后模拟队列,始终只保持比当前之前更大的,因为当前之前更小的,是没有机会成为max的。 https://discuss. 阅读全文
posted @ 2017-02-26 00:22 blcblc 阅读(156) 评论(0) 推荐(0)
摘要: 题目: https://leetcode.com/problems/distinct-subsequences/?tab=Description 一般没有明显思路的情况下,都要想想DP,用下Divide-and-Conque 下面的思路很好,很清晰 https://discuss.leetcode. 阅读全文
posted @ 2017-02-26 00:05 blcblc 阅读(328) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/zqh_1991/article/details/52729203 阅读全文
posted @ 2017-02-25 23:51 blcblc 阅读(192) 评论(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 阅读(627) 评论(0) 推荐(0)
摘要: 这是一个系列,层层加深难度。 http://www.cnblogs.com/grandyang/p/5203228.html 还是不错的,通过在两端增加新的数字,来判断。注意0也要继续叠加的,因为0可以存在数字的中间。 阅读全文
posted @ 2017-02-25 21:28 blcblc 阅读(188) 评论(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 阅读(176) 评论(0) 推荐(0)
上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 233 下一页