/NewMileChallenge

Code challenge for new mile

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

https://newmilepub.blob.core.windows.net/candidates/2023-newmile-coin.txt

Details

  • NewMile coin is a fictional, highly volatile cryptocurrency
  • This structured file linked above has price history for the first 6 months of 2023 (traded daily)
  • Using the language of your choice, write something that will analyze this file (or another in a similar format) and produce details regarding what would have been the best possible return with one buy and one sell of one unit (obviously you can’t sell before you buy)
  • Desired output example:
    • Buy January 22, 2023 for $22.00
    • Sell April 1, 2023 for $88.00
    • Profit $66.00
    • Return 300%

Solution by Alex Guevara

Run node --no-warnings maximize-profit.js in the current directory