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.
"a" is the array, to know the length of the array to add the correct amounts of "0" - "y" wich is the index
.
Ruby translation kumited, including a cleaner description -- please check and approve it (note: author is inactive)
From what I can see, you are trying to pop fourth item in "sausage_row" which only has three items (in the first sample test).
The intention is that you don't know all types of sausages that exist, so you have to identify them using their packaging (and as natan wrote, other specifics of a good sausage package). All of the necessary info is in the Kata's description.
there is a problem with interpreter.
i use vscode and my code works on it, but it doesnt work in here
Maybe you're testing the wrong things. Look at how the description specifies good sausage and test that.
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
Approved.
Fork of C++ translation with fix for non-compiling sample tests
Fixed in C++ translation
Oh dear, I am an idiot.
Sorry for that, will fix it.
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.
With math you are moving in the good direction.
As for implantation, you know that you have problems with larger numbers and still do multiplication.
Just look at "numerator = 2757240" in the description example, thats crazy.
Try to work out math further to by pass this, so that you would not have such a larger number at one point of time.
Loading more items...