We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Manasa and Stones
Manasa and Stones
Sort by
recency
|
953 Discussions
|
Please Login in order to post a comment
Here is my c++ solution, you can watch the explanation here : https://youtu.be/BXNoCVP0XEE Solution 1 :
Solution 2 :
Here is PHP solution!
n-1; b- current = (b) ? b; current * arr[] = $initial;
for (i <i++) { arr); count-1; arr[diff; new; } arr);
Here is my Python solution!
There's a mistake in multiple places in problem description (n should be the number of non-zero stones, but it's the number of all stones). Python3