标签:数据 blog ++ import 桶排序 generated main span void
先看代码
import java.util.Arrays; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub int[] a = {9,5,4,3,7,3,2,1,2};//数据范围是0-10 int[] b = new int[11]; for(int i = 0;i<a.length;i++){ b[a[i]]++; } for(int i = 0;i<b.length;i++){ for(int j = 1;j<=b[i];j++){ System.out.println(i); } } } }
标签:数据 blog ++ import 桶排序 generated main span void
原文地址:http://www.cnblogs.com/LoganChen/p/6842731.html