Delete the nodes containing val in the linked list