Arista Networks Interview Question

Debug a problem and write a function to delete successive nodes of a linked list.