Question : Can I kill the Boss You and your friend are playing a video game in which you have to defeat the final Boss. The Boss starts with an initial health value. There are n number of bombs kept in front of you. The ith bomb causes 'i' units of health to decrease for the boss. You both take turns to hit the boss with these bombs. Once a bomb is used, it cannot be reused. Both of you can choose any bomb from the available bombs in your respective turn. The boss dies when it's health reaches 0 or below. The player who kills the Boss wins the game. You have to pick the first bomb to throw at the Boss. Given the initial health of the Boss, the number of bombs, n, return true if you can force a win, otherwise, return false. Assume both players play optimally.
Input Specification:
input1: An integer value n denoting the number of bombs. (1<=n<=20)
input 2: An integer value denoting the boss initial health value (0<=input2<=300)
Output Specification
Return true if you win, else return false
Example 1:
Input1: 10
Input 2: 11
Output - False
Explanation
No matter which player the first player chooses, the first player will lose. The first player can choose a bomb which causes damage from 1 up to 10 health units.
If the first player chooses a bomb number 1, the second player can only choose a bomb which causes damage from 2 upto 10 health units
The second player will win by choosing bomb number 10 and will kill the boss
Same with other bombs choosen by the first player, the second player will always win