Introduction
In computer science, a stack is an abstract data type that serves as a collection of elements, with two main operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed. In this challenge, we will implement a stack with push, pop, and min methods running O(1) time.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
algorithm(("`Algorithm`")) -.-> algorithm/BasicAlgorithmsGroup(["`Basic Algorithms`"])
python(("`Python`")) -.-> python/ControlFlowGroup(["`Control Flow`"])
python(("`Python`")) -.-> python/DataStructuresGroup(["`Data Structures`"])
python(("`Python`")) -.-> python/FunctionsGroup(["`Functions`"])
python(("`Python`")) -.-> python/ModulesandPackagesGroup(["`Modules and Packages`"])
python(("`Python`")) -.-> python/ObjectOrientedProgrammingGroup(["`Object-Oriented Programming`"])
python(("`Python`")) -.-> python/AdvancedTopicsGroup(["`Advanced Topics`"])
python(("`Python`")) -.-> python/PythonStandardLibraryGroup(["`Python Standard Library`"])
algorithm/BasicAlgorithmsGroup -.-> algorithm/stacks_queues("`Stacks Queues`")
python/ControlFlowGroup -.-> python/conditional_statements("`Conditional Statements`")
python/DataStructuresGroup -.-> python/tuples("`Tuples`")
python/FunctionsGroup -.-> python/function_definition("`Function Definition`")
python/FunctionsGroup -.-> python/default_arguments("`Default Arguments`")
python/ModulesandPackagesGroup -.-> python/importing_modules("`Importing Modules`")
python/ModulesandPackagesGroup -.-> python/standard_libraries("`Common Standard Libraries`")
python/ObjectOrientedProgrammingGroup -.-> python/classes_objects("`Classes and Objects`")
python/ObjectOrientedProgrammingGroup -.-> python/constructor("`Constructor`")
python/ObjectOrientedProgrammingGroup -.-> python/polymorphism("`Polymorphism`")
python/ObjectOrientedProgrammingGroup -.-> python/encapsulation("`Encapsulation`")
python/AdvancedTopicsGroup -.-> python/iterators("`Iterators`")
python/PythonStandardLibraryGroup -.-> python/os_system("`Operating System and System`")
python/FunctionsGroup -.-> python/build_in_functions("`Build-in Functions`")
subgraph Lab Skills
algorithm/stacks_queues -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/conditional_statements -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/tuples -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/function_definition -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/default_arguments -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/importing_modules -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/standard_libraries -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/classes_objects -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/constructor -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/polymorphism -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/encapsulation -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/iterators -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/os_system -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
python/build_in_functions -.-> lab-268888{{"`Implement O(1) Stack with Push, Pop, Min`"}}
end