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.
Agree, this does not make sense. How can this tag be removed?
You changed the required signature of the function. It should return, quotint the description, "top rows of Pascal's Triangle flattened into a one-dimensional list/array", and you changed it to
int[,]
.Usually problems are related to overflow, and you can verify this by comparing your results to, for example, results returned by Wolfram: https://www.wolframalpha.com/input/?i=binomial%2860%2C30%29 .
Run your solution locally for n=60, dump the answer to the console, and check numbers in the middle of the row, because these are the largest: (59 28), (60 30) etc.
It's possible that your calculations either overflow, or are inaccurate due to floating point division.
I have almost the same "Expected" and "but was" in the error for random and 60th, but it's quite hard to check all numbers. Anyway, any number i check is correct aaccording to "expected". What can be the problem?