• + 1 comment

    For anyone that may be a little confused by the challenge, and failing a test case here or there... think of it this way. The best choice for the player is to choose the index that benefits him the most, but is not as simple as finding the largest un-used number left in the player's array. It might be a smarter strategy to block the other player's largest number. Example:

    Player1nums : 100 200 500 Player2nums : 900 200 50

    Player1 should pick index 0 because it blocks player2 from collecting on that 900.

    Is there a way to assess the benefit of picking a given i value? Find that way of assessing the benefit and you are on your way to solving this.