摘要:
Brute Force(暴力) 阅读全文
摘要:
每次找到当前最大数,转两下把最大数转到最右边.重复这个操作,直到都转完. 时间复杂度O(n**2) class Solution(object): def pancakeSort(self, A): """ :type A: List[int] :rtype: List[int] """ maxA, 阅读全文
摘要:
append: Appends object at the end. gives you: [1, 2, 3, [4, 5]] extend: Extends list by appending elements from the iterable. gives you: [1, 2, 3, 4, 阅读全文