Skip to content

clarity on what this mean #25

@HawiCaesar

Description

@HawiCaesar

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions