摘要:
问题描述:Implement regular expression matching with support for '.' and '*'. 算法分析:.*可以匹配任意字符串,例如ab匹配.*,不是说让.匹配完a然后再去匹配*,而是*匹配的是.,也就是说(.*)==(..........),所以 阅读全文
posted @ 2016-05-24 19:49
32ddd
阅读(402)
评论(0)
推荐(0)
摘要:
public class StringToInt { public int atoi(String s) { long num = 0; int minus = 0; if(s==null) { return (int)num; } //过滤所有空格 ... 阅读全文
posted @ 2016-05-24 14:57
32ddd
阅读(484)
评论(0)
推荐(0)
摘要:
此题很简单,要考虑整数溢出的情况。 阅读全文
posted @ 2016-05-24 12:02
32ddd
阅读(488)
评论(0)
推荐(0)
摘要:
public class ZigzagConvert { public static String convert(String s, int nRows) { int len = s.length(); if (len == 0 || nRows 0 && i < nRows-1) { ... 阅读全文
posted @ 2016-05-24 10:24
32ddd
阅读(312)
评论(0)
推荐(0)

浙公网安备 33010602011771号