using System.Collections.Generic;
public static void Main()
var n = new[] { 2, 6, 4, 7, 9, 4, 3, 4 };
Console.WriteLine(Enumerable.SequenceEqual(FindNearesSmallest(n), new[] {-1, 2, 2, 4, 7, 2, 2, 3}));
IEnumerable<int> FindNearesSmallest(int[] input)
for(int i=0;i<input.Length-1;i++){