New Linked List-based algorithm