← All problemsSign in

Playing with Contiguous Array

An arithmetic array is an array that contains at least two integers and the differences between consecutive integers are equal. For example, $[9, 10]$, $[3, 3, 3]$, and $[9, 7, 5, 3]$ are arithmetic arrays, while $[1, 3, 3, 7]$, $[2, 1, 2]$, and $[1, 2, 4]$ are not arithmetic arrays. Daniel has an array of $N$ $non-negative$ integers. The $i-th$ integer of the array is $Ai$. He decided to sea

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