Update linked list sample code