-
Notifications
You must be signed in to change notification settings - Fork 442
Open
Description
algoClass/data-structures/stack.js
Line 81 in 813224e
| 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
Metadata
Metadata
Assignees
Labels
No labels