Problem 817 · Medium

Linked List Components

Count maximal runs of consecutive list nodes whose values are in a given set.

Open the interactive visualisation