Problem 2150 · Medium

Find All Lonely Numbers in the Array

Find the values that occur exactly once and have no neighbouring integer present in the array. The visual places each value on a number line and checks its left and right neighbours.

Open the interactive visualisation