Sahilamin219's blog

By Sahilamin219, history, 3 years ago, In English

I was doing this question asked in recent HackFest in Hackerrank . I know its too simple but anyhow i m not able to score all 20 points.

my code

Please help ..i m not able to find the solution.

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey!
So here would be my solution to the problem:

def whoIsTheWinner(arr):
  n = len(arr)
  N = len(set(arr))
  if (n != N) and (n % 2 == 0):
    return "Second"
  else:
    return "First"