Intro to Nim

You are playing a game of Nim with a friend. There are n piles of stones. On each turn, a player chooses one pile and removes any positive number of stones from it. The player who takes the last stone wins. Both players play optimally. Determine whether the first player has a winning strategy.

Examples
Input: [3,4,5]
Output: true
Hints

Intro to Nim

You are playing a game of Nim with a friend. There are `n` piles of stones. On each turn, a player chooses one pile and removes any positive number of stones from it. The player who takes the last stone wins. Both players play optimally. Determine whether the first player has a winning strategy.