Array Kitkat
CodeChefOpen on judge ↗
You are given an array of size N and you have to perform following operations on it. 1) You have to select 1st and last element form array and find it's positive difference. Then again find the positive difference between 2nd and second last element. then 3rd and third last element and so on. 2) Add this all differences. If the sum of all the positive differences is a prime number then you
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