Skip to content
descholar-ceoPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fifo and lifo

For a quick demo link

Click this link to see this program running on replit: fifo_lifo on replit, you will need to click on run button

How to run it?

  1. Run this command git clone https://github.com/descholar-ceo/fifo-lifo.git && cd fifo-lifo to clone and go in this repo

  2. Run ruby bin/main.rb

It will display the result based on the following inputs:

purchases_and_sells = [4, -2, -1, 5, -0.5, -0.5, -4.5] # Positive indicate purchase, negative indicate sells
prices = [5000, 6500, 7000, 6000, 8000, 9000, 6500] # Each price is for a purchase or sells of the same index from purchases_and_sells array

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages