Challenge: Collect Coins in Minimum Steps

In this lesson, we will find out the minimum number of steps it takes to collect coins using a given array that is the height of vertically stacked coins.

Coin Collection in Minimum Steps

Suppose you are given many adjacent piles of vertically stacked coins, like so

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.