Jump to Sibling
Lav has an array $A$ of size $N$. He noticed that Chef is initially standing at the **first** index of the array. While standing at the $i^{th}$ index $(1 \leq i \lt N)$ of the array, Chef can perform the following types of jumps: - $\texttt{Jump 1}$: Jump to the immediate next index $j$ such that $A_i$ and $A_j$ have the **same** [parity](https://en.wikipedia.org/wiki/Parity_(mathematics)). - $\
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