using System.Collections.Generic;
public static void Main()
smallestInt = GetSmallestPositiveInteger(A);
Console.WriteLine(smallestInt);
public static int solution(int[] array)
HashSet<int> found = new HashSet<int>();
for (int i = 0; i < array.Length; i++)
while (found.Contains(result))
using System.Collections.Generic;
public static void Main()
smallestInt = GetSmallestPositiveInteger(A);
Console.WriteLine(smallestInt);
public static int solution(int[] array)
HashSet<int> found = new HashSet<int>();
for (int i = 0; i < array.Length; i++)
public static int solution1(int[] A)
A = A.OrderBy(x => x).ToArray();
for (int i = 0; i < A.Length; i++)
public static int GetSmallestPositiveInteger(int[] A) {
if((A == null)||(A.Length == 0)){ return 1;}
A = A.OrderBy(x => x).ToArray();
for (int i = 0; i < A.Length; i++){
else if (A[i] == smallestInt)