计数排序
2018-09-18 22:01:06 0 举报
计数排序流程图
作者其他创作
大纲/内容
if hash[number] == undefined
hash[number] = hash[number] + 1
N
index2 -index2+1
Y
End
if count != undefined
print newArr
countIndex - 0
while index2 = max
newArr.push(index2)
number - a[index]
count - hash[index2]
while index a['length']
Start
countIndex - countIndex+1
hash[number] = 1
index2 - 0max - findMax(a) //找到最大值newArr - {}
while countIndex count
index - index+1
0 条评论
下一页