Balanced Numbers in a Permutation
CodingOnline AssessmentSoftware EngineerReported May, 2026High Frequency
Company question banks are included with the Insider plan.
You are given a permutation p of length n.
A number k is called balanced if there exists a contiguous subarray p[l..r] whose elements form a permutation of the numbers 1, 2, ..., k.
For...