DEV Community

Discussion on: Finding Max in a Stack

 
racheladaw profile image
Rachel Williams

Oh I see. I did misunderstand at first, I apologize for that. So your solution is a loop, but with pushing to a holding stack while comparing values? This also assumes that no new values are added to the stack. Am I understanding it correctly?

Thread Thread
 
sduduzog profile image
Sdu

Yes that definitely it