Problem 1426 · Easy

Counting Elements

Count how many values in an array have their successor also present in the array. The visual marks each value and links it to value plus one when that value exists.

Open the interactive visualisation