摘要:
1 def f(x): 2 return x*x 3 print map(f,[1,2,3,4,5]) 4 5 [1, 4, 9, 16, 25] 6 7 def format_names(s): 8 return s[0].upper()+s[1:].lower() 9 pr... 阅读全文
摘要:
https://leetcode.com/problems/merge-sorted-array/Merge Sorted ArrayGiven two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted arra... 阅读全文
摘要:
https://leetcode.com/problems/remove-element/Remove ElementGiven an array and a value, remove all instances of that value in place and return the new ... 阅读全文
摘要:
https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if d... 阅读全文
摘要:
https://leetcode.com/problems/remove-duplicates-from-sorted-array/Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in pl... 阅读全文
摘要:
https://leetcode.com/problems/insert-interval/Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge i... 阅读全文
摘要:
https://leetcode.com/problems/merge-intervals/Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[... 阅读全文
摘要:
https://leetcode.com/problems/sort-colors/Sort ColorsGiven an array withnobjects colored red, white or blue, sort them so that objects of the same col... 阅读全文
摘要:
https://leetcode.com/problems/insertion-sort-list/Insertion Sort ListSort a linked list using insertion sort.题目:插入排序 1 # Definition for singly-linked ... 阅读全文
摘要:
https://leetcode.com/problems/sort-list/Sort ListSort a linked list inO(nlogn) time using constant space complexity.来自http://www.cnblogs.com/zuoyuan/p... 阅读全文