微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 伴随数组、计数排序的运用

伴随数组、计数排序的运用

时间:12-01 来源:互联网 点击:

for(; i >

if(k == 0)
break;
}
if(k == 0)
return array[i];
}

int main()
{
int i = 0;
int num = 0;
node anode;
vector > array;

for(i = 0; i < 10; ++ i)
{
cin >> num;
anode.num = num;
anode.index = i;

array.push_back(anode);
}

for(i = 0; i < 10; ++ i)
cout < array[i].num < " ";
cout < endl;

cout < "the 3rd num in 2 to 6: ";
cout < zoomsort(array, 2,6,3) < endl;
cout < "the 4th num in 1 to 7: ";
cout < zoomsort(array, 1,7,4) < endl;
cout < "the 4th num in 3 to 9: ";
cout < zoomsort(array, 3,9,4) < endl;

return 0;
}

虽然,找工作是挺打击自己的,但是我相信会逐渐好起来的。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top