DEV Community

Discussion on: Minimum stack

Collapse
 
mutax profile image
Ryo Muta

Thank you for the introduction! It seems like a great idea with potential for flexibility, such as changing the pair values to the maximum or other values.

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.