// The minimum selection method. // This algorithm finds minimum repeatedly // and places it at positions i=1, 2, ..., n. // min is the tentative minimum for a[i+1], ..., a[n]. // k is the position of the minimum. j scans // the array portion to find the minimum #include #include main() { int i,j,k,n,min,t; int a[10000]; printf("input size \n"); scanf("%d",&n); /*for (i=1;i<=n;i++) { scanf("%d",&a[i]);};*/ for (i=1;i<=n;i++) a[i]=random()%1000; t=clock(); for (i=1;i<=n-1;i++) { min=a[i]; k=i; for (j=i+1;j<=n;j++) { if (a[j]