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 the main idea of Pascal Triangle here is just to understand what is it and how to generate new lines, rest of the task is more related to your preferable programming language. I've heard about this triagnle before I started so it's not such a hard thing
sure, my bad 🤗
Please use spoiler flag next time.
containsDuplicates
method returns true or false,!!
sign converts to boolean. So you don't need it in this case.sort
two times. If you will work with array with 1 000 000 000 items, this operation will really slow down your computer.If you want to make your solution clearier, try to
keys
arr.push(this[keys[i]])
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
You'll have to insert something into your code to see the parameters they're using for testing. Maybe print the inputs?
Regarding this test, if 13 is a possible total given the cards available, then you should return 13 and not 23, because the instrauctions say: "Return the highest score of the cards that is less than or equal to 21."
23 should equal 13
is this?? i don't get what are the parameters they are using for testing
Approved
This comment is hidden because it contains spoiler information about the solution
Description cannot be approved, recent changes from related record must be merged first.
Please post the test case.
Hey guys, i ran my code written in python and it passed all the test cases except this one i.e., "23 should be equal to 13" i don't know why but it seems a mistake in that test cases (maybe) coz i checked by creating my own test cases of both 23 and 13 ..
can any one give me a reason why this happened ??
Approved.
Loading more items...