1. 程式人生 > >算法導論第三版思考題8-3.b

算法導論第三版思考題8-3.b

har 思考 clas let cnblogs count light highlight true

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