Add linked list based solution