summaryrefslogtreecommitdiff
path: root/progs/a241.py
blob: 87b4697720f28eea45b556eb71edacc16239fd00 (plain)
1
2
3
4
5
6
7
8
9
def get_odd_occurence(arr, arr_size):
  for i in range(0, arr_size):
    count = 0
    for j in range(0, arr_size):
      if arr[i] == arr[j]:
        count += 1
    if (count % 2 != 0):
      return arr[i]
  return -1