首页 > 代码库 > 算法导论第三版思考题8-3.b

算法导论第三版思考题8-3.b

SORT_PROBLEM_B(A)
	let m be the count of character set
	let B[0..m-1] be a new array
	for i = 0 to m-1
		make B[i] an empty list
	for i = 1 to A.length
		k = A[i][0]-‘a‘
		C[i] = A[i][1...A[i].length]
		insert C[i] into list B[k]
	for i = 0 to m-1
		SORT_PROBLEM_B(B[i])

  

算法导论第三版思考题8-3.b