摘要: class Solution { public: bool isMatch(string s, string p) { int m = s.size(), n = p.size(); vector<vector<bool>> dp(m + 1, vector<bool>(n + 1, false)) 阅读全文
posted @ 2017-02-01 21:07 王坤1993 阅读(160) 评论(0) 推荐(0)
摘要: class Solution {public: bool isPalindrome(int x) { //negative number if(x < 0) return false; int len = 1; while(x / len >= 10) len *= 10; while(x > 0) 阅读全文
posted @ 2017-02-01 21:03 王坤1993 阅读(156) 评论(0) 推荐(0)
摘要: public class Solution { public int myAtoi(String str) { if (str.isEmpty()) return 0; int sign = 1, base = 0, i = 0, n = str.length(); while (i < n && 阅读全文
posted @ 2017-02-01 00:26 王坤1993 阅读(184) 评论(0) 推荐(0)