计数排序
2017-11-11 15:43:31 0 举报
计数排序流程图
作者其他创作
大纲/内容
no
index2=max
index++
var number=a[index]
index2++
yes
a[maxIndex]a[index]
count=0
start
indexa[length]
var a=数组;hash=[];index=0;maxIndex=0
maxIndex=index
print newArr
counthash[index2]
hash[number]==undefind
count++
end
var newArr=[];index2=0;max=a[maxIndex]
hash[number]=1
newArr.push[index2]
hash[number]++
0 条评论
下一页