Answers for "Python - Odd Occurences in Array"

0

Python - Odd Occurences in Array

# you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")
from collections import Counter
#Given a number, return true if its even or false if its odd
def evenOdd(N):
    if((N % 2) == 0):
        return True
    else:
        return False

def solution(A):
    # write your code in Python 3.6
    counterArray = Counter(A)
    answer = 0
    for k, v in counterArray.items():
        if(evenOdd(v) == False):
            if answer < k:
                answer = k
                return answer
Posted by: Guest on July-08-2021

Code answers related to "Python - Odd Occurences in Array"

Browse Popular Code Answers by Language