03 2018 档案

摘要:leetcode刷题时遇到了78题Subset,写了上面的代码,在第15行最开始用了注释里的result.append(item),把item的引用(地址)传给了result,结果每次递归result中除了原有的‘[]’元素,其他都同步在变。 下面是nums=[1,2,3]时,使用result.ap 阅读全文
posted @ 2018-03-11 18:53 imageSet 阅读(150) 评论(0) 推荐(0) 编辑