摘要: list2里面含两个练习,方法多彩多样。D题实现对list内数据去重操作,E题实现对已排序list实现归并排序,并且要求线性时间复杂度。题目和代码如下: 1 # D. Given a list of numbers, return a list where 2 # all adjacent == elements have been reduced to a single element, 3 # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or 4 # modify the passed in list. 5 de 阅读全文
posted @ 2013-04-01 18:41 Emma437211 阅读(297) 评论(0) 推荐(0) 编辑