Brighterion Interview Question

Given an array [dog cat llama...], traverse the array and for each element in the array, write that element to a file that begins with the first letter of that element. For example, write cat to c.txt, dog to d.txt, etc.