This problem asks to find the highest profit given a list of daily prices. We are provided with an array of integers and have to find the highest p...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks for your post! I've tried finding a simpler solution:
I did not test for performance, though. Nevertheless, I think it's more readable.
I think your solution is very clever using the spread operator to find the highest profit. I tried to share a solution where the step-by-step is very clear, so it can be rewritten in any language! Thanks again for yours, it is great!
Thank you :)