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.
Easy to read and understand compared to the other solutions though it will have overall time complexity is O(n).
nice you are now 4kyu !!!! asking make you more smarter!
This comment is hidden because it contains spoiler information about the solution
Best solution, imho
Js array split and join method both use for loops underneath the hood making your solution have a time complexity of O(n + m) but solving in string without converting to array the for loop runs only once and gives a better solutions with O(n) time complexity.
This comment is hidden because it contains spoiler information about the solution
Same problem.