摘要: def radix_sort(array): bucket, digit = [[]], 0 while len(bucket[0]) != len(array): bucket = [[], [], [], [], [], [], [], [], [], []] for i in range(len(array)): ... 阅读全文
posted @ 2018-09-21 23:49 anobscureretreat 阅读(260) 评论(0) 推荐(0)
摘要: import copy def heap_sort(hlist): def heap_adjust(parent): child = 2 * parent + 1 # left child while child heap[child]: child += 1 # right child ... 阅读全文
posted @ 2018-09-21 23:47 anobscureretreat 阅读(186) 评论(0) 推荐(0)
摘要: def select_sort(slist): for i in range(len(slist)): x = i for j in range(i, len(slist)): if slist[j] < slist[x]: x = j slist[i], slist[x]... 阅读全文
posted @ 2018-09-21 23:46 anobscureretreat 阅读(158) 评论(0) 推荐(0)
摘要: def quick_sort(qlist): if qlist == []: return [] else: qfirst = qlist[0] qless = quick_sort([l for l in qlist[1:] if l = qfirst]) return qless + [qfirst]... 阅读全文
posted @ 2018-09-21 23:44 anobscureretreat 阅读(145) 评论(0) 推荐(0)
摘要: def bubble_sort(blist): count = len(blist) for i in range(0, count): for j in range(i + 1, count): if blist[i] > blist[j]: blist[i], blist[j] = blist[... 阅读全文
posted @ 2018-09-21 23:43 anobscureretreat 阅读(191) 评论(0) 推荐(0)
摘要: def shell_sort(slist): gap = len(slist) while gap > 1: gap = gap // 2 for i in range(gap, len(slist)): for j in range(i % gap, i, gap): if sl... 阅读全文
posted @ 2018-09-21 23:42 anobscureretreat 阅读(164) 评论(0) 推荐(0)
摘要: def insert_sort(ilist): for i in range(len(ilist)): for j in range(i): if ilist[i] < ilist[j]: ilist.insert(j, ilist.pop(i)) break re... 阅读全文
posted @ 2018-09-21 23:31 anobscureretreat 阅读(375) 评论(0) 推荐(0)
摘要: 写出 shell 脚本中所有循环语法 for 循环 : for i in $(ls);do echo item:$i done while 循环 : #!/bin/bash COUNTER=0 while [ $COUNTER -lt 10 ]; do echo The counter is $COUNTER let COUNTER=COUNTER+1 done until 循... 阅读全文
posted @ 2018-09-21 18:17 anobscureretreat 阅读(212) 评论(0) 推荐(0)
摘要: rospack find 包名 阅读全文
posted @ 2018-09-21 11:33 anobscureretreat 阅读(1120) 评论(0) 推荐(0)
摘要: Continuous Integration (CI) / Continuous Delivery (CD) 阅读全文
posted @ 2018-09-21 00:06 anobscureretreat 阅读(903) 评论(0) 推荐(0)