Arista Networks interview question

write a function to remove matches in linked list.