Convert integer array to Linked List

O(N^2) function to iterate the list and adding an element