Testing Example #1 (cont)
Then we test it on a range of arrays (where N==9 ):
$ ./checkorder 1 2 3 4 5 6 7 8 9
Yes
$ ./checkorder 2 8 32 64 65 66 666 667 700
Yes
$ ./checkorder 9 8 7 6 5 4 3 2 1
No
$ ./checkorder 1 2 3 4 5 6 7 9 8
No
|
Looks ok, but a few days later we hear the familiar cry ... "It doesn't work!".
$ ./checkorder 1 2 3 4 5 6 6 7 8
No
|
|