If space is neither start of array nor last element of array and element before it greater than / the element next to space
if ( index - 1 >= 0 and index + 1 < n and arr [ index - 1 ] > arr [ index + 1 ] ) : NEW_LINE