Compare two linked lists