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.
Did you solve it though? Also don't understand it
EDIT: solved it. For future users, refer to the previous comment made in this discussion:
It's not clear that the input represents a price timeline where the sale occurs sometime after the purchase, and not, say, a list of shops where you can trade freely.
I didn't understand how the first test is supposed to return 6 and the last, -1.
This kata requires no optimization whatsoever.
Read about properties of prime numbers, filter the possible divisors and their upper-bounds instead of doing an exponential-complexity computation.
I'm trying this in Python 3.6, if anyone can point sources helpful to acccomplish this task, I'd greatly appreciate.
Would you mind looking at my code and perhaps giving me a direction? Any help would be appreciated.
I didn' mean it's a bad approach, seems fine and it should work if your code is right. It's just not necessary (there are different possibilities depending on the language you're using), you will see it when you solve this kata :)
Thanks, will look for alternatives.
Since weeks have been following each other without interrumption since so, you can do it many other ways. It doesn't matter how you do it, the important is your code returns the right result. I'm sure most people who solved this kata (and I) didn't know this.
We should take into account that the Gregorian Calendar began on a Saturday, correct?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution