You need to sign in or sign up before continuing.×
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.
If you initialize the array of registers with fill(0), you don't have to loop over them.
let arr = new Array(n).fill(0)
You should rename "prev" and "next" to "checkouts" and "nextCustomer" or something like that... This confuses the way that reduce() works.
For removing extra
\n
at the end, when number of letters % n === 0I came to report this issue. How can a pattern breaker be identified with only three items?
Using n inside the RegExp was very clever.
Why the trim though? You already replaced all white spaces with nothing.
This comment is hidden because it contains spoiler information about the solution
C#-Translation kumited!
https://www.codewars.com/kumite/57bbef418f5813b8d1000106
Please check and approve it!
Yes, I know that, but this kata is ranked 8 kyu and is meant to be very easy.
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
The problem doesn't say it, but it's priced so that you must buy a quantity of three to get the discount.
For example, you want four mangoes so you get three for the price of two plus one for regular price.