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.
Yes, I did exactly what you say ,But in a more stupid way
Prototypes is workly so fast and so optimised in JS. Let go of your prejudices and explore what prototype programming is (Not only in JS).
A line break or a tab or any other whitespace character (which trims to zero-length) will break this program; the word splitting is just bare enough to pass the tests.
That's probably more future-proof way for real production code, except I'd use ES6 spread for
Math.min
.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
While not very efficient for exactly this task; this algorithm does have the future! Image your Product Manager comes in and asks to tweak the function, to count per-language. You'd pass not only a string, but locale as well. In this case, you'd have to check the Unix index numbers of each character, because let's say Urdu could have some English characters sprinkled inside and thus void the unique character count.
redundant
i
regex flagthe "case insensitive" regex flag
i
is redundantThis 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
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...