Sobes.tech
Junior — Senior

MinStack: stack with support for the minimum element in O(1)

livecode

Task condition

It is necessary to create a data structure - a stack, all its methods should operate in constant time.

class MinStack {
    pop() {
    }

    push(value) {
    }

    getMin() {
    }
}