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.
The O(1) solution is good. But it is just a matter of observing mathematics patterns, which I don't think it is good because we are practicing computer algorithm, rather than to guess match patterns. So my solution is computer-like and this is a more general approach to solving algorithm problems.
Game of Stones
You are viewing a single comment's thread. Return to all comments →
The O(1) solution is good. But it is just a matter of observing mathematics patterns, which I don't think it is good because we are practicing computer algorithm, rather than to guess match patterns. So my solution is computer-like and this is a more general approach to solving algorithm problems.