Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It looks like this is a time series of price values of some item: you read the prices left to right, and for each price value you must decide to buy or sell or pass. You cannot go back in time. In your example, if you bought at 0.8, you would only be able to sell at 0.9 or 1.0, because selling at 1.2 would require you to go back in time.
'looks like u solved it'
Very artificial exercise. Completely useless test cases. Waste of time
Python by default has a recursion limit of 1,000, meaning a function can't call itself more than 1,000 times.
Check that the your solution is not falling foul of this.
Looks like you need to actually read the challenge and not just skim it.
This comment is hidden because it contains spoiler information about the solution