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)
.
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
- Make sure Ruby is installed
- Navigate to project folder:
cd stack
- Add some testing data in the
extras.rb
file and run it usingruby extras.rb
- Or add and run your own unit testing
👤 Mahmoud Makhlouf
- GitHub: @devMahmoud
- LinkedIn: Mahmoud Makhlouf
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.