摘要: 感觉需要注意的点就是在A-Z和a-z之间还夹了6个其他的字符,所以统计的时候不能用new int[52]需要new int[58] 代码; 阅读全文
posted @ 2016-10-25 13:23 warmland 阅读(252) 评论(0) 推荐(0) 编辑
摘要: BitInteger的最简单的部分 把两个string反过来,从后往前加,可以学习的地方是对于while的条件可以设置成,index1< len1 || index2 < len2. 然后在内部分别对index1 < len1和index2 <len2处理,这样就不用对其中一个提前结束的情况单独再写 阅读全文
posted @ 2016-10-25 13:01 warmland 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 原题链接: https://leetcode.com/problems/longest-absolute-file-path/ Suppose we abstract our file system by a string in the following manner: The string "d 阅读全文
posted @ 2016-10-25 12:44 warmland 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 之前做过的g家面经。 就是比起存原矩阵,把矩阵转换成每行储存该行到此位置的和 比如原来的一行是,1,2,3,4,那么现在的矩阵就是1,3,6,10。 于是每次update需要把从第row行col列开始到这行结束的位置都更新,是O(n) 每次sumRegion是每行col2-col1的差的和,也是O( 阅读全文
posted @ 2016-10-25 11:13 warmland 阅读(129) 评论(0) 推荐(0) 编辑