Interactive Equivalency
Two arrays $A$ and $B$ of size $N$ are **equivalent** if for every $(i,j)$ $(1 \le i \lt j \le N)$, $B_i = B_j$ if and only if $A_i = A_j$. For example, $[1,2,2]$, $[10,11,11]$, $[5,1,1]$ are equivalent, while $[1,2,3,1]$, $[10,20,10,10]$ are not. There is a hidden array of $N$ integers, where the elements are numbered from $A_1, A_2, \dots, A_N$. Your task is to guess any array which is equivale
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