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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
@dagro - my point was to use your tests to see how much work you can get done before timing out
See how fast you can generate it for a number up to 300,000 and go from there :)
My first successful attempt managed 8.5 seconds for that one number
It took me the better part of 3 evenings to make everything happen in < 7s and I would not have believed it possible at first
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
There really are three separate problems to handle
You can intentionally fail your tests at certain points and optimize these portions of your solution separately e.g. by using a single test case with an increasingly higher number or by adding a class variable which counts how many times a function has been called and start returning zeroes after that to fail the test.
This way you will get much better feedback than 'oops, wrong'
Your program should remember what it has and has not done. That's all really ¯\_(ツ)_/¯
But I would also suggest you try your solution with different big inputs. You may be thinking that passing all 5000 tests is your main problem but it is also possible that your code is not efficient enough to compute
performant_numbers(N)
whereN > 150,000
.I've tested Python and it worked just fine, there is no test with "there".
"often" is an exception and "of" isn't in the 6th test.