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.
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.)
The kata got unpublished, and I removed the 1 kyu vote from a cheater.
Currently, the only outlier vote is 3 kyu from the approver.
The 1 kyu vote was cast by a person who got later suspended for cheating, so it is not relevant and should be removed. This leaves us with 5x6kyu, 1x7kyu, and... 1x3kyu cast by the approver as, I believe, the highest rank allowed by the system.
This does not seem right :D
To the person who approved this kata (as well as the 1 kyu one), please try consulting with other users on Discord before approving new katas - your sense of reference seems a bit off.
That being said, the voting situation here also looks a bit questionable. When votes vary wildly, it's worth trying to understand the context: for example, has the kata been reworked several times with its difficulty changing, but users never updated their rank assessments? Or are some votes simply outliers that should be disregarded before finalizing the rank?
Based on the rank assessment votes, this shouldn't be approved at 4kyu.
Votes: https://www.codewars.com/api/v1/code-challenges/5fe399429f548e0023d5c816/assessed-ranks
Sorry about the inconvenience, the kata has been updated into something that'd be more manageable to me, I'll try to fix the issue of the first kata
The splitting process needs to be further specified. For example, another way one might split
{"r":4, "e":5, "f":6, "d":7}into2equal-sized chunks is({'d': 7, 'f': 6}, {'r': 4, 'e': 5})or({'f': 6, 'e': 5}, {'d': 7, 'r': 4}). Your expected answer implies thatdshould be viewed as a sequence comprised ofkchunks of key-value pairs. Whiledictpreserves insertion order in Python >=3.7, that is not a general property of all Python mapping types, and it is definitely not a property of mapping types in other languages. I'd suggest changing the input type to a proper sequence like alistortuple.Also, the order of the resulting list of combos is not specified. The test cases make it appear to be lexicographic order based on the insertion order of
d, but this should be specified in the description.For point 2, it should be sufficient to say that the number of key-value pairs in
dis always divisible byk, which is also stated in the description.Loading more items...