桶排序
2017-11-14 13:14:47 0 举报
桶排序 伪代码的流程图
作者其他创作
大纲/内容
countIndex count
newArr - { }
是
Index = Index +1
count = hash[Index2]
number - a[Index]
count != undefined
否
Index2 - Index2 +1
max - FindMax (a)
a- 一个数组
print newArr
newArr.push(Index2)
hash[number] = hash[number] + 1
开始
countIndex - countIndex +1
Index - 0
Index a['length']
Index2 = max
hash[number] = undefined
hash - { }
hash[number] = 1
结束
countIndex - 0
Index2 - 0
0 条评论
下一页