public static int solution(int[] A)
        {
            CountingSort_Integer.Sort(A, -1000000, 1000000);
            A = CountingSort_Integer.NewArray;
            int small = 1;

            for (int i = 0; i < A.Length; i++)
            {
                if (A[i] == small)
                {
                    ++small;
                }
            }

            return(small);
        }
Пример #2
0
 public void Sort()
 {
     CountingSort_Integer.Sort(IntegerArray, -1000000, 1000000);
     IntegerArray = CountingSort_Integer.NewArray;
 }