In this project, I implemented a simple #stock_picker method
The project implement's a #stock_picker method that takes in an array of stock prices, one for each hypothetical day. It should return a pair of days representing the best day to buy and the best day to sell. Days start at 0 and we need to buy before we can sell.
E.g.
> stock_picker([17,3,6,9,15,8,6,1,10])
=> [1,4] # for a profit of $15 - $3 == $12
This project is built with Ruby and run at the terminal so in order run it:
- You start by installing ruby on your computer
- Then you clone the project from githup into a local repository
git clone git@github.com:abongsjoel/stock-picker.git
- Navigagte into the stock-picker folder
cd stock-picker
- Run the application using the following command
ruby main.rb
- Voila
- Enjoy
- Ruby
👤 Chi A. Joel
- GitHub: @abongsjoel
- Twitter: @thierryjoel10
- LinkedIn: Chi Abongwa Joel
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.