You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Implement a stack with a min method which returns the minimum element currently in the stack. This method should have O(1) time complexity. Make sure your implementation handles duplicates.
I can't seem to figure out what the question is asking. When implementing the stack I had it look like so {1: 'ABC', 2: 'DEF'...}. But won't get the minimum value be 0 ? Or should we use numbers as values ? I am bit confused
The text was updated successfully, but these errors were encountered:
algoClass/data-structures/stack.js
Line 81 in 813224e
I can't seem to figure out what the question is asking. When implementing the stack I had it look like so
{1: 'ABC', 2: 'DEF'...}
. But won't get the minimum value be 0 ? Or should we use numbers as values ? I am bit confusedThe text was updated successfully, but these errors were encountered: