SPECIAL ARRAY
CodeChefOpen on judge ↗
You are given an array with n elements. A given array is a special array if the absolute difference of consecutive elements is less than equal to 2.You have to find if on deleting any one element the resulting array can be a special array. ###Input: - The first line contains the number n which is the size of the array where $3 \leq n \leq 10000$ - The next n lines contain the numbers in the a
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