title: Find The Number Occurring Odd Number Of Times 1
signature: find_the_number_occurring_odd_number_of_times_1 <- function(arr, size) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(arr, size, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(arr, size), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          list(49L, 90L), 1L, 
          49L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          list(-96L, 94L, 92L, -24L, 48L, 54L, -30L, -86L, 28L, -18L, 12L, -64L, -36L, 68L, 68L, -78L, -6L, 30L, -84L, 20L, 52L, -36L, 40L, -62L, 90L, -48L, 86L, 98L, 12L, 44L, 98L, -66L, 52L, 34L, 36L, 76L, -50L, -20L, -20L, -20L), 39L, 
          -96L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          list(0L, 1L), 1L, 
          0L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          list(79L, 55L, 18L, 99L, 38L, 93L, 19L, 49L, 21L, 74L, 16L, 76L, 82L, 52L, 86L, 17L, 42L, 9L, 6L, 63L, 1L, 40L, 75L, 59L, 41L, 81L), 23L, 
          79L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          list(-90L, -84L, -82L, -68L, -66L, -66L, -60L, -60L, -48L, -44L, -36L, -34L, -30L, -16L, -14L, -12L, -10L, -6L, 2L, 10L, 10L, 14L, 22L, 26L, 30L, 34L, 46L, 50L, 52L, 62L, 64L, 64L, 66L, 72L, 74L, 78L, 78L, 82L, 84L, 88L, 92L), 23L, 
          -90L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          list(1L, 1L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 1L, 1L, 1L, 1L, 0L, 0L, 1L, 1L, 1L, 0L, 1L, 0L, 0L, 1L, 0L, 1L), 18L, 
          1L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          list(2L, 4L, 5L, 7L, 7L, 18L, 18L, 23L, 23L, 25L, 25L, 31L, 41L, 43L, 45L, 46L, 52L, 52L, 55L, 64L, 69L, 69L, 80L, 81L, 84L, 90L, 91L, 93L, 94L, 94L, 94L, 94L, 96L, 98L, 99L), 20L, 
          2L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          list(86L, 66L, -8L, 2L, -18L, -22L, 38L, 4L, -38L, -54L, 78L, 64L, 78L, 20L, -32L, 84L, -70L, 66L, -46L, 12L, -12L, 8L, 44L, 14L, 20L), 20L, 
          86L
      )))
  
      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, 1L), 21L, 
          0L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          list(11L, 4L, 98L, 38L, 20L, 41L, 1L, 8L), 7L, 
          11L
      )))
  
  }
  
  main()
source_py: def find_the_number_occurring_odd_number_of_times_1(arr, size):
      Hash = dict()
      for i in range(size):
          Hash[arr[i]] = (Hash.get(arr[i], 0) + 1)
      for i in Hash:
          if ((Hash[i] % 2) != 0):
              return i
      return (- 1)
source_cpp: int find_the_number_occurring_odd_number_of_times_1(vector<int> arr, int size) {
    unordered_map < int, int > hash;
    for ( int i = 0;
    i < size;
    i ++ ) {
      hash [ arr [ i ] ] ++;
    }
    for ( auto i : hash ) {
      if ( i . second % 2 != 0 ) {
        return i . first;
      }
    }
    return - 1;
  }