問題詳情
35. Complete the pseudo code below for the counting sort algorithm. We assume
Input: A[1. . n],where A[j]

{0, 1, , k} forj = 1, 2,..., n. Array A and values n and k aregiven as parameters.
Output: B[1 . . n], sorted. B is assumed to be already allocated and is given as a parameter.
Auxiliary storage: C[O . . k]
COUNTING-SORT(A, B, n, k)

(A)

(B)

(C)

(D)

(E)

參考答案
答案:[無官方正解]
難度:計算中-1
書單:沒有書單,新增