MissingInteger【★★★】
1 /// <summary> 2 /// Solution 3 /// 100/100 4 /// </summary> 5 /// <param name="A"></param> 6 /// <returns></returns> 7 public static int solution(int[] A) 8 { 9 int result = 1; 10 Array.Sort(A); 11 foreach (int num in A) 12 { 13 if (num == result) 14 result++; 15 } 16 return result; 17 }