08 2017 档案

摘要:在做LintCode上的递归类题目子集时,我一开始的想法是递归到最后一层即单元素时然后开始逐层返回,产生相应的每层的子集并添加到最终的结果中去。于是乎有了以下代码: 算法似乎很正确,每层返回处理的时候有一个pre_result和result两个List,其中result由new ArrayList< 阅读全文
posted @ 2017-08-31 14:45 Revenent 阅读(158) 评论(0) 推荐(0)
摘要:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2017-08-15 11:05 Revenent 阅读(318) 评论(0) 推荐(0)