Task 1: Binary String You are given an integer, $n > 0. Write a script to find all possible binary numbers of size $n bits. Example 1 Input: $n = 2 Output: 00, 11, 01, 10 Example 2 Input: $n = 3 Output: 000, 001, 010, 100, 111, 110, 101, 011 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: Odd String You are given a list of strings of same length, @s. Write a script to find the odd string in the given list. Use positional value of alphabet starting with 0, i.e. a = 0, b = 1, ... z = 25. Find the difference array for each string as shown in the example. Then pick the odd one out. Example 1: Input: @s = ("adc", "wzy", "abc") Output: "abc" Difference array for "adc" => [ d - a, c - d ] => [ 3 - 0, 2 - 3 ] => [ 3, -1 ] Difference array for "wzy" => [ z - w, y - z ] => [ 25 - 22, 24 - 25 ] => [ 3, -1 ] Difference array for "abc" => [ b - a, c - b ] => [ 1 - 0, 2 - 1 ] => [ 1, 1 ] The difference array for "abc" is the odd one. Example 2: Input: @s = ("aaa", "bob", "ccc", "ddd") Output: "bob" Difference array for "aaa" => [ a - a, a - a ] => [ 0 - 0, 0 - 0 ] => [ 0, 0 ] Difference array for "bob" => [ o - b, b - o ] => [ 14 - 1, 1 - 14 ] => [ 13, -13 ] Difference array for "ccc" => [ c - c, c - c ] => [ 2 - 2, 2 - 2 ] => [ 0, 0 ] Difference array for "ddd" => [ d - d, d - d ] => [ 3 - 3, 3 - 3 ] => [ 0, 0 ] The difference array for "bob" is the odd one. MY NOTES: Hmm.. not always a single odd one out. What are we supposed to do if there is no odd one out?