[求助]数字排序(selection sort)
使用下列数据:
int x[MAX_ITEMS] = { 8,5,2,13,1,17,6,4,9,15,7,3 } ;
做selection sort(选择性排序)
要求用到下列三种操作程序:
First user-defined function performs general operations of the particular algorithm.
Second user-defined function performs array display operation.
Third user-defined function performs actual sorting algorithm.
void selectionFunc( )
{
int x[MAX_ITEMS]={8,5,2,13,1,17,6,4,9,15,7,3} ;
// declare array
// display unsorted array
selectionSort(x[ ], item_size) ;
// display sorted array
}
void displayArray(int x[ ], int len)
{
int index;
for (index=0 ; index<len ; ++index)
{
// printf statement
}
}
void selectionSort(int x[ ], int size)
{
// sorting algorithm
}
我手上有流程图,和步骤列表,不知道怎么传!
请大家先帮忙看看这个,我在想办法!
急用!!!