Show Navigation
Conversation
Notices
-
@lottievixen You did, but no worries. Here's the deal: Build me a stack which has the normal stack routines (push, pop) but it also has another one: find-min. Each of these 3 functions should run in constant (O(1)) time. You can use as much memory as you want, so yes @er1n you can have another stack, although saying it out loud spoils the solution a bit ;)
-
Oh yeah, and you're *implementing* the stack, so you can implement all of the methos and the actual storage however you want.