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.
in decode, it is string.replaceAll(i+1, vowel);
Still doesn't work, and decode don't get executed anyways, I don't know why.
wtf no wrong code!
This comment is hidden because it contains spoiler information about the solution
array methods such as
indexOf()
are not magical, they use loops behind the scenes. you have to take into account how library functions work when you reason about your code's space and time complexity.Check the hint at the bottom:
aight thx
There are two problems with your solution:
n = 30
,30!
has 32 digits but JavaScript'sNumber
can hold ~16 digits at most. When your values get larger than 16 digits, the least significant digits are lost and you cannot use them reliably for this problem.n
can go up to1_000_000_000
. Calculating1_000_000_000!
will take forever, and your naive solution will not work because it will be too slow, and will eat up whole available memory.You need to find some better approach than calculating the exact value of the factorial.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Please don't post solutions in Discourse, use Solutions section to discuss your solution.
check the solutions, there are plenty good solutions out there!
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...