Problem 2784 · Easy

Check if Array is Good

Decide whether nums is a permutation of base[n], which holds 1 to n-1 once each and n twice.

Open the interactive visualisation