% cd ~/cs21/
% mkdir week8
% cd week8
% cp ~newhall/public/cs21/week8/* .
% ls
For example, if the starting contents of the array are the following:
0 1 2 3 4 5 ------------------------------------- | 7 | 3 | 5 | 6 | 2 | 3 | -------------------------------------Then, after the first pass of the Selection Sort algorithm, the array contents are:
0 1 2 3 4 5 ------------------------------------- | 2 | 3 | 5 | 6 | 7 | 3 | -------------------------------------
Try running and testing your implementation by re-directing your program's input to the testinput file:
% ./a.out < testinput
% time binary
% time linear
0.170u 0.010s 0:00.19 94.7% 0+0k 0+0io 129pf+0w
^^^^^^^
this value is the total time it took to run (19 seconds)
#define MAX_VALUES 100000Re-compile (type make), and then run the time command on binary and linear