Chunky Pairs
CodeChefOpen on judge ↗
You’re given an array A having $N$ elements. A pair ( i , j ) will be considered as a ‘chunk pair’ if for all $k$ ( i <= k <= j ) A [ k ] is unique in that segment. Of all such good pairs print the length of the largest possible segment contained by the pair (i,j). ###Input: - First line will contain $N$, length of array . - Next line contains $N$ integers. ###Output: Single integer
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start