title: Find The First Missing Number
signature: find_the_first_missing_number <- function(array, start, end_arg2) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(array, start, end_arg2, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(array, start, end_arg2), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          list(3L, 6L, 7L, 9L, 11L, 14L, 18L, 30L, 30L, 32L, 32L, 34L, 37L, 44L, 45L, 45L, 48L, 48L, 48L, 52L, 58L, 60L, 63L, 67L, 69L, 69L, 81L, 83L, 87L, 89L, 97L, 99L), 24L, 18L, 
          19L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          list(88L, -62L, 16L, 80L, 66L, 78L, 88L, 38L, 52L, -96L, 48L, 98L, 96L, -62L, 18L, 34L, -58L, 30L, -10L, 26L, -98L, 48L, -96L, 4L, 92L, 36L, 36L, -36L, -32L, -70L, 62L, -58L, -58L, -84L, 86L, -98L), 19L, 26L, 
          19L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          list(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), 26L, 28L, 
          26L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          list(79L, 99L, 79L, 85L, 61L, 58L, 62L, 61L, 39L, 87L, 39L, 74L, 36L, 70L, 30L, 43L, 20L, 52L, 54L, 50L, 81L, 98L, 42L), 20L, 20L, 
          20L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          list(-98L, -72L, -46L, -44L, -42L, -40L, -16L, -4L, 62L, 70L, 74L), 8L, 10L, 
          8L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          list(1L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L), 26L, 23L, 
          24L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          list(58L), 0L, 0L, 
          0L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          list(4L, -84L, -42L, 12L, -50L, 42L, -36L, -38L, -36L, 98L, -2L, 20L, 6L, -96L, -78L, 24L, 34L, 88L, 0L, 74L, 0L, -8L, -86L, -68L, -42L, 98L, -26L, 86L, -70L, -32L, -82L, 78L, 46L, 58L, 84L, 4L, -60L, -90L, -52L, -78L), 37L, 31L, 
          32L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          list(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), 28L, 28L, 
          28L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          list(8L), 0L, 0L, 
          0L
      )))
  
  }
  
  main()
source_py: def find_the_first_missing_number(array, start, end):
      if (start > end):
          return (end + 1)
      if (start != array[start]):
          return start
      mid = int(((start + end) / 2))
      if (array[mid] == mid):
          return find_the_first_missing_number(array, (mid + 1), end)
      return find_the_first_missing_number(array, start, mid)
source_cpp: int find_the_first_missing_number(vector<int> array, int start, int end) {
    if ( start > end ) return end + 1;
    if ( start != array [ start ] ) return start;
    int mid = ( start + end ) / 2;
    if ( array [ mid ] == mid ) return find_the_first_missing_number ( array, mid + 1, end );
    return find_the_first_missing_number ( array, start, mid );
  }