计数排序
2018-05-20 09:53:09 1 举报
计数排序
作者其他创作
大纲/内容
NO
hash[number] == undefined
START
number = a [index]
index2 = index2+1
true
index2 = max
hash[number] = 1
index2 = 0;max = findMax(a);newArr = 0;
print newArr
YES
count != undefined
index = index+1
newArr .push(index2)
END
hash[number] = number +1
index a ['length']
countIndex count
countIndex = count + 1
false
count = hash[index2];countIndex = 0;
a = [数组];hash = [];index = 0;
0 条评论
下一页