您的位置:首页 > 其它

一个数组中有n种符号,对该数组进行排序

2008-06-02 00:08 218 查看
typescount = new int
;

types = new int
;

for (int i = 0; i < arr.length; i++) {

for (int j = 0; j < n; j++) {

if (types[j] == null) {

types[j] = arr[i];

typescount[j] =1;

break;

} else if (types[j] == arr[i]) {

typescount[j]++;

break;

}

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐