/stack

Primary LanguageRuby

stack

Description

In this repo, I created a Stack class that has push, pop, and max methods. Also, I created a class called Extras which includes all the methods from the Stack class and a method called mean. the max and mean methods calculate the maximum value and the average on large number of data with a run time of O(1).

Getting Started

To get a local copy on this project on your machine follow these steps

  • Open your terminal
  • Run this command: git clone https://github.com/devMahmoud/stack.git

Prerequisites

  • Make sure Ruby is installed

Usage

  • Navigate to project folder: cd stack
  • Add some testing data in the extras.rb file and run it using ruby extras.rb
  • Or add and run your own unit testing

Author

👤 Mahmoud Makhlouf

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.