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 are given 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)

答案:登入後查看
統計: A(0), B(0), C(0), D(0), E(1) #3067441

詳解 (共 1 筆)

#7102367
1. 題目解析 題目要求我們完成計數排序...
(共 895 字,隱藏中)
前往觀看
0
0