Problem 1764 · Medium

Form Array by Concatenating Subarrays of Another Array

Match all groups as ordered, nonoverlapping contiguous blocks inside nums.

Open the interactive visualisation