Alex can have all odd, even indices but not necessarily always follow this pattern. For example : [5,4,3,5] in this case alex will pick 5 &4 which is one on even index and one on odd index.
yes, Alex can choose from 0th and 1st index too.. But here we are thinking in this way that, Alex is intentionally choosing only even or odd indices as she know the sum of stones at even and odd indices and She is choosing even or odd indices where the sum is greater.
when you spend half an hour on the question and then got to know you just had to return 1.
haha
Alex can have all odd, even indices but not necessarily always follow this pattern.
For example : [5,4,3,5] in this case alex will pick 5 &4 which is one on even index and one on odd index.
yes, Alex can choose from 0th and 1st index too.. But here we are thinking in this way that, Alex is intentionally choosing only even or odd indices as she know the sum of stones at even and odd indices and She is choosing even or odd indices where the sum is greater.
i am really shocked about the solutions no words ???!!!!
function stoneGame (nums) {
return true
};
Great. The best solution for this task. Appreciate
Confusing explanation.
Thank you for the clear explanation!
I think solution has some gap. In recursion we are not considering the moves taken by lee.
Nice explanation sir....your videos are really helpful
not able to understand why lee moves are not counted.
can anyone please explain ?
Awesome bro.Please explain leetcode 1130 solution also.Thanks.
wow wow wow that's crazy lol
WTF