Task 1: Third Highest You are given an array of integers. Write a script to find out the Third Highest if found otherwise return the maximum. Example 1 Input: @array = (5,3,4) Output: 3 First highest is 5. Second highest is 4. Third highest is 3. Example 2 Input: @array = (5,6) Output: 6 First highest is 6. Second highest is 5. Third highest is missing, so maximum is returned. Example 3 Input: @array = (5,4,4,3) Output: 3 First highest is 5. Second highest is 4. Third highest is 3. MY NOTES: seems very easy. sort, take 3rd biggest distinct element (or biggest element if less than 3) GUEST LANGUAGE: As a bonus, I also had a go at translating ch-1.pl into C (look in the C directory for the translation) Task 2: Maximum XOR You are given an array of integers. Write a script to find the highest value obtained by XORing any two distinct members of the array. Example 1 Input: @array = (1,2,3,4,5,6,7) Output: 7 The maximum result of 1 xor 6 = 7. Example 2 Input: @array = (2,4,1,3) Output: 7 The maximum result of 4 xor 3 = 7. Example 3 Input: @array = (10,5,7,12,8) Output: 15 The maximum result of 10 xor 5 = 15. MY NOTES: also quite easy, try all combinations, pick max of all xors. GUEST LANGUAGE: As a bonus, I also had a go at translating ch-2.pl into C (look in the C directory for the translation). Needed to pass original sizes into C routine..