changed solutions-linked-list into a twice linked list (next, prev)