← All problemsSign in

Laila and Majnu

Majnu wants to impress Laila by giving her a present of an array and Laila only likes Arithmetic Arrays (the elements of the array should form an arithmetic sequence.) Majnu somehow arranges an array $A$ = [$A1$, $A2$, $A3$] of size $3$ but it is not necessarily the arithmetic array. Majnu can perform a special kind of operation in which he can add $1$ to any of the elements. One such operation ta

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start