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.

# Tower Breakers - The Final Battle

# Tower Breakers - The Final Battle

#### Sort by

recency

#### |

#### 19 Discussions

#### |

Please Login in order to post a comment

Didn't see any solution in JS, so here you go.

And here's another solution. How it works is explained further down, see the entry of @kiwic.

Here is Tower Breakers - The Final Battle problem solution in Python Java C++ and C programming- https://programs.programmingoneonone.com/2021/07/hackerrank-tower-breakers-the-final--battle-problem-solution.htmlThis is not a hard algorithm, rather it's a horrible game, hard to understand & poorly explained by the platform.

Precalculating all values in range for the inverse of the function you're actually interested in feels like a weird solution until you realize said inverse grows exponentially . . . I think. Frankly I wasn't very rigorous in my argument to myself that it isn't superexponential.