Lecture 7, question 9. Input array, return singly-linked list.