DEV Community

Discussion on: Minimum stack

Collapse
 
vivekvohra profile image
Vivek Vohra

You're absolutely right! By modifying the additional stored value (eg. tracking the maximum instead of the minimum or even other metrics like a running sum), you can adapt this idea to suit different problem requirements.