public static void sort(String[] a, int W) {
		// ͨǰWַa[]
		int N = a.length;
		int R = 256;
		String aux[] = new String[N];

		// ݴҵ󣬵dַüW
		for (int d = W - 1; d >= 0; d--) {

			// һֵƵ
			int[] count = new int[R + 1];
			for (int i = 0; i < N; i++) {
				count[a[i].charAt(d) + 1]++;
			}

			// ڶƵת
			for (int r = 0; r < R; r++) {
				count[r + 1] += count[r];
			}

			// Ԫط
			for (int i = 0; i < N; i++) {
				aux[count[a[i].charAt(d)]++] = a[i];
			}

			// Ĳд
			for (int i = 0; i < N; i++) {
				a[i] = aux[i];
			}
		}
	}