using System.Collections.Generic;
public static void Main()
int[] data = new int[] { -7, -5, -3, 1, 3, 6, 4, 1, 2 };
int[] newArray = new int[data.Max()];
for (int i = 0; i < data.Length; i++)
newArray[data[i] - 1] = 1;
for (int i = 0; i < newArray.Length; i++)
Console.WriteLine("First missing positive is " + (i + 1));