[Solved] compare and subtract current value from next 3 value


I’d split the problem to several steps:

  1. Find the value index. If given an index you can skip this step.
  2. Compute the subtraction with the value or values below it.
  3. Compute the subtraction with the value or values above it.

Note that you should only base your run on indices, not values.

solved compare and subtract current value from next 3 value