算法
shangqing.liu
这个作者很懒,什么都没留下…
展开
-
冒泡排序优化方法
冒泡排序的四种解法 1 . 常规冒泡 def bubble_sort_1(array=[]): for i in range(len(array) - 1): for j in range(len(array) - i - 1): if array[j] > array[j + 1]: temp = array[j] array[j] = array[j + 1] array[j + 1] = temp 测试 my_array原创 2021-01-11 20:46:17 · 178 阅读 · 0 评论 -
1.Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same ...原创 2018-10-20 16:45:01 · 131 阅读 · 0 评论