摘要:
counting sort: for A[1,...,n], given that for any i, 0<=i<=n, then c<=A[i]<=d. let m = d-c+1, create an array B[1, ..., m]. each item B[j] means how many items in A are less or equal to c+j-1:for i <- 1 to n B[A[i]]++for j <- 2 to m B[j] = B[j] + B[j-1] then it's easy to constr 阅读全文
posted @ 2011-06-01 11:35
freestyleking
阅读(615)
评论(0)
推荐(0)
浙公网安备 33010602011771号