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.
retired
Really cool kata! A few more sample tests with slightly more numbers, and a bigger range of numbers, would be nice though, I found myself relying on random tests to debug quite a bit.
This was why I uploaded the kata to ask for how I would check that the errors are being thrown. I will unpublish and add the error handling and then should be OK.
Test cases like
computing n^kandcompute factorialdoes not check whether solution handles invalid cases by throwing error first before actually try doing the calculation with try-except. Also, there are better ways to test this behavior than using try-except.It's not a performance issue you're having. Try throwing error when there are invalid case (
len(stack) <= 2for example). This is an issue with the test case.Pretty challenging kata to figure out.
The author asks you to find the maximum sum of contiguous subsequence in a list, not to generate all possible contiguous subsequence and find the max sum between all those generations.
Both leads to the same conclusion, yes. But what is required to complete the task can differ.
Ask yourself, if you want to calculate the sum of 1 million 3s, do you make a loop that will add to a variable 1 million times? That would be slow, instead we can just do
1_000_000 * 3. The same logic can be applied here. You just need to find the same result using a different and faster algorithm.My suggestion would be to just skip the kata if you don't know how to solve this yet, you can come back later.
Thanks for this kata — it was a fun and tricky little simulation challenge! I liked figuring out how to step through the string and “blow” the candles efficiently until they were all gone.
fixed
In
Tasksection:Folder should be
filesnotfileI vote for 5kyu + Voile's suggestion.
I agree with 5kyu + Viole's suggestion, I think that makes it more interesting.
I created an issue above to discuss the rank of this kata. Please reply there with your suggestions.
Should this kata be approved at 6 kyu or 5 kyu? I suggest to implement Voile's suggestion and limit the number of memory cells to 3 (only one extra memory cell). I also suggest to remove the initial BF code which spoils potential solutions.
(The issue is to prevent an accidental approval.)
Loading more items...