Problem 3217 · Medium

Delete Nodes From Linked List Present in Array

Put the forbidden values in a set, then keep only the list nodes whose values are not in it.

Open the interactive visualisation