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.
I think all the types of sausages should be displayed in the problem statement.
In my case, I only found all the types of sausages from the automated tests, after having written a solution for it.
So, this:
"Straight sausages I, curvy sausages ), even twirly sausages @ and many more."
Should say:
"Sausages may be represented as such: "@" , "I" , ")" , "║" , "l" , "1" , "(" , "|" , "¦" . "
Cheers,
Razvan Boboc
I think the formula in the description is flawed: (n k) = n!/(n-k)!
According to this wiki page, the formula is: (n k) = n!/k!(n-k)!
https://en.wikipedia.org/wiki/Binomial_coefficient
I tried the formula from the description and the generated elements are not correct.
As for the second one, it is fine.
Thanks, I eventually forfeited unfortunately.
I just didnt seem to find any solution to those high numbers.
At first I tried simplifying the fractions, but that however still did not work.
What I got was time overflow.
This comment is hidden because it contains spoiler information about the solution
Not good very bad words !!
@Chrono79, B1ts
I solved it, thanks a lot!!!
What I have is something rather conspicous
All the tests pass so I dont have a reference
Here's a screenshot after I click attempt : http://prntscr.com/uu5d2v
TypeError: Cannot read property 'toUpperCase' of undefined
Only one test fails after I click attempt.
Do you guys know what it is? How can a value be undefined, when I am clearly passing a string to the function.
Can someone explain map((x, y, a) => x + '0'.repeat(a.length - y - 1))?
I know it adds zeroes to the digits from the int part but I can't understand why we pass (x, y, a) => x + '0'.repeat(a.length - y - 1) to the map method
Sorry if it is a stupid question, thanks