I'll admit that I often spend more time than I should refactoring after I have a solution. I do feel like there seems to be a bit too much focus on "golf" coding often to the detriment of readability. It is easy to get caught up in the game though. I wouldn't worry too much if you're able to follow those shorter solutions, it will just start to trickle into your own solutions.
Damn right, I solved it in 32 lines of code, though it took me like 3 hours and lots of researches to solve it.. I even did a hand-drawn algorithm for the first time in years xD
If Counter does what you want, why not use it? Anyway your question is unclear and not related to the kata. If you want to discuss a particular Python feature, you'd better go on Codewar's Discord Python channel (see left panel).
I'll admit that I often spend more time than I should refactoring after I have a solution. I do feel like there seems to be a bit too much focus on "golf" coding often to the detriment of readability. It is easy to get caught up in the game though. I wouldn't worry too much if you're able to follow those shorter solutions, it will just start to trickle into your own solutions.
This comment is hidden because it contains spoiler information about the solution
solutions with itertools can pass tests, to my knowledge
make sure you do not have any unecessary calculations
i made another solution without using itertools and it still won't work.. what should i do?
it means your solution is not efficient enough
yes, an engineer may help :P
Execution timed out error, what should I do.. maybe ask an engineer to solve this problem? xD
i really wonder how are we supposed to shorten our codes like that.
Damn right, I solved it in 32 lines of code, though it took me like 3 hours and lots of researches to solve it.. I even did a hand-drawn algorithm for the first time in years xD
I get depressed when I see experts solve this in 4 lines of code, then I solve it in 32 lines xD
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
If Counter does what you want, why not use it? Anyway your question is unclear and not related to the kata. If you want to discuss a particular Python feature, you'd better go on Codewar's Discord Python channel (see left panel).
U're damn right, thanks bro!
This isn't a kata issue, it's a problem with your code. In your pc, the input is a number, here it is an array of numbers. Please read this: https://docs.codewars.com/training/troubleshooting
Loading more items...