25. Negate Elements 3–8

Easy

Given a 1-D integer array Z, negate all elements that are strictly between 3 and 8. Return the result.

Input

[ 0  1  2  3  4  5  6  7  8  9 10]

Output

[ 0  1  2  3 -4 -5 -6 -7  8  9 10]

Sign in to write and run your own code.

Implement solve(...)