int*relativeSortArray(int* arr1,int arr1Size,int* arr2,int arr2Size,int* returnSize){int index =0;int hash[1001]={0};for(int i =0; i < arr1Size;++i){
hash[arr1[i]]++;}//计数排序for(int i =0; i < arr2Size;++i){while(hash[arr2[i]]>0){
arr1[index++]= arr2[i];
hash[arr2[i]]--;}}//置换arr1数组for(int i =0; i <1001;++i){while(hash[i]>0){
arr1[index++]= i;
hash[i]--;}}//其余数字按照升序排放*returnSize = arr1Size;//返回数组大小return arr1;//返回首地址}