Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 522 Bytes

File metadata and controls

15 lines (11 loc) · 522 Bytes

Special Stack with get_min

Task

Implement a stack with get_min method that takes O(1) time.

Notes

Stack with get_min() method can be implemented by using 2 simple stacks. The first one will be used to store items and provide ordinary operations. The second stack will make store only minimal items per push.

make helps generate main and test binaries to run tests or interactive main program.

Targets:

  • make build
  • make run
  • make test
  • make clean