2 # print out the median time to each hop along a route.
4 for (f =
5; f
<=
NF; ++f
) {
11 # insertion sort the times to find the median
12 for (i =
2; i
<= n
; ++i
) {
13 v = time
[i
]; j = i
- 1;
22 if (n
> 1 && (n %
2) ==
0)
23 median =
(time
[n
/2] + time
[(n
/2) + 1]) / 2
25 median = time
[(n
+1)/2]