Problem 659 · Medium

Split Array into Consecutive Subsequences

Extend an existing run when possible; otherwise start a new run of three consecutive values.

Open the interactive visualisation