• + 0 comments

    We can imagine this solution as a climbing many mountains and finding the tallest mountain by climbing where more energy is needed to climb than downclimb. We need to sum height at every level of a mountain while only climbing. And in real we don't need to add while downclimbing(that is subtracted) till next mountain arrives. Real life problems are related to such problems. It may be the old technique to calculate heights of mountains. If you want to visualize as I say then create a bar chart for the A of the nxn solution.