摘要: 题目地址:https://leetcode.com/problems/house-robber/解析:此问题采用动态规划,根据题意,到达第i个房子最大收益应该为第i-2个房子最大收益加上第i个房子钱数与到达第i-1个房子最大收益两者的最大值。题目答案:public class Solution { ... 阅读全文
posted @ 2015-04-08 14:26 buptubuntu 阅读(102) 评论(0) 推荐(0)
摘要: 题目地址:https://leetcode.com/problems/rising-temperature/题目解答:# Write your MySQL query statement belowselect w1.Id from Weather w1 inner joinWeather w2 o... 阅读全文
posted @ 2015-04-08 11:48 buptubuntu 阅读(104) 评论(0) 推荐(0)
摘要: 转自http://blog.codinglabs.org/articles/theory-of-mysql-index.html首先总结一下文章的内容:1.数据结构基础:B-Tree和B+Tree2.B-/+Tree索引的性能分析B+Tree更适合外存索引,原因和内节点出度d有关。从上面分析可以看到... 阅读全文
posted @ 2015-04-08 11:34 buptubuntu 阅读(59) 评论(0) 推荐(0)
摘要: 题目地址:https://leetcode.com/problems/wildcard-matching/动态规划解答:public class Solution { public boolean isMatch(String s, String p) { if(p.length... 阅读全文
posted @ 2015-04-08 09:18 buptubuntu 阅读(105) 评论(0) 推荐(0)