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.
Having seen the answers, my hint above is incorrect. You do need to generate these numbers, but the way to generate them is quite clever. Even with the right way, you need to ensure that your algorithm is efficient.
I feel like this my solution is a bit of a cheat. I had a pretty efficient algorithm for generating them but it wasn't fast enough, so I assumed that this was the way to solve it.
Ok. I get it. Generating green numbers is expensive - To do it in less than O(nlogn) would require a lot of effort (if it's even possible). However, given that n will always be <=3000, there might be a better way to do it.
How high does the Haskell solution check? I can get it to generate the 10000th number with my algorithm in about 12.5s but it always fails with a timeout on the server. I'm really struggling to see where I can get any more performance improvement.