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.
Treating the whole array as a string is even better instead of iterating over it :)
Would have saved myself alot of time with this approach vs. writing a million if statements.
Yes, there's a difference. Your solution in fact more performant than the OP's solution. His solution has O(n^2) time complexity and yours is O(n) meaning it's much faster.
I tried to go this route, but I did not have in mind to merge the two like that.
Such a brilliant solution!
In python, I can pass the largest tests simply by returning zero. Furthermore, based on the error messages, it seems that the python reference solution is using floating point arithmetic, which cannot possibly work with the larger tests (perhaps this is why they are disabled?).
More of a logic problem than a coding challenge.
I think it's called numerical sequences in Math.
regex is amazing.
This comment is hidden because it contains spoiler information about the solution
Same here, I couldn't figure out how to implement regex like this one then I gave up xD.
Nice!
I tried to go down this route, but couldn't figure out where to put the $ sign
Removed shuffling in sample tests and fixed tests. Also updated to latest framework and other smaller optimisations installed.
RegExp don't work like that brother. It will just check only one single character inside the bracket as if you write like you've shown. Check https://regexlearn.com/cheatsheet .
damn this regex again.
This comment is hidden because it contains spoiler information about the solution
this regExp is a must to learn bro
Loading more items...