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.
One line, and 5-10 times slower. This solution is relatively fast
Excellent solution. Fastest one yet!
Not really. This solution is very slow because of excessive Linq.
This comment is hidden because it contains spoiler information about the solution
Excellent solution. Finally see someone else who stored the sum of each number in an array. Interesting take on calculating scores using modulus.
Not sure what you're talking about re: efficiency. OP's code is very efficient...nearly as fast as my own. Yours, however, is extremely inefficient. OP's code outpaces your own 18:1.
Great solution, very fast.
Best comment ever ð
Surprisingly, nope
I copied this solution to VS Code so I could benchmark it...Crashed VS Code ðĪŠ
Restarted, recopied, benchmarked...slow, even with the hardcoding ð
Using a dictionary would be slower than using a simple int array as OP has done. You're adding more overhead/complexity and probably memory usage as well by using a dictionary.
OP's solution is exceedingly fast (see my comment about his error, though). Even much faster than my own (using a short
str1
input...really long ones, my code is much faster), which is faster than all of the other solutions posted here that I've tested.This comment is hidden because it contains spoiler information about the solution
Per kata author's instructions, only lower case letters will be provided. Which means zero non-letters, whitespace, digits, null/empty strings.
This comment is hidden because it contains spoiler information about the solution
Loading more items...