Task 1: Consecutive Odds You are given an array of integers. Write a script to print 1 if there are THREE consecutive odds in the given array otherwise print 0. Example 1 Input: @array = (1,5,3,6) Output: 1 Example 2 Input: @array = (2,6,3,5) Output: 0 Example 3 Input: @array = (1,2,3,4) Output: 0 Example 4 Input: @array = (2,3,5,7) Output: 1 MY NOTES: very easy. 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: Widest Valley Given a profile as a list of altitudes, return the leftmost widest valley. A valley is defined as a subarray of the profile consisting of two parts: the first part is non-increasing and the second part is non-decreasing. Either part can be empty. Example 1 Input: 1, 5, 5, 2, 8 Output: 5, 5, 2, 8 Example 2 Input: 2, 6, 8, 5 Output: 2, 6, 8 Example 3 Input: 9, 8, 13, 13, 2, 2, 15, 17 Output: 13, 13, 2, 2, 15, 17 Example 4 Input: 2, 1, 2, 1, 3 Output: 2, 1, 2 Example 5 Input: 1, 3, 3, 2, 1, 2, 3, 3, 2 Output: 3, 3, 2, 1, 2, 3, 3 MY NOTES: also quite easy, once we remove the negative "non-increasing" language and realise we mean "find the leftmost longest sequence of one or more adjacent numbers where initially the numbers go down (or stay the same) and then they go up (or stay the same)." 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)