Back to Browse

Stack min() Operation in Constant O(1) Time

33 views
Aug 28, 2019
1:45

A constant-time operation for returning the smallest value in a stack using an array and an index variable. This video describes: - how push() and pop() update the array and variable - pseudocode for min() and what happens when it's called - a set of push(), pop(), and min() operations and how they update the stack, array, and variable, in addition to the return value

Download

1 formats

Video Formats

360pmp42.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Stack min() Operation in Constant O(1) Time | NatokHD