solve linkedlist