TEST CASES

-------------------------------------------------------------------------------------------------------
Test Case 1:

n = 15

1 10 13 4 3 7 9 15 11 6 2 8 12 5 14 

Distance by Method 1: 17
Distance by Method 2: 17
-------------------------------------------------------------------------------------------------------
Test Case 2:

n = 25

21 20 4 18 2 5 19 15 10 24 17 8 1 6 3 22 12 13 11 16 25 14 7 23 9 

Distance by Method 1: 60
Distance by Method 2: 60
-------------------------------------------------------------------------------------------------------
Test Case 3:

n = 34

12 32 16 6 19 15 31 18 27 30 1 25 9 20 26 21 14 7 34 29 5 23 17 3 22 2 13 33 4 24 8 10 11 28 

Distance by Method 1: 162
Distance by Method 2: 162
-------------------------------------------------------------------------------------------------------

EVALUATION GUIDELINES:

7 marks each for correct output (total 20 marks)
8 marks for logical correctness function dist1()
14 marks for logical correctness function dist2() [marks may be deducted from here if the running time is not O(n log n)]
2 marks for indentation
2 marks for comments

Total marks: 40