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.
This comment is hidden because it contains spoiler information about the solution
This is a coding exercise, not a physics experiment. In programming you have to account for input errors.
That's O(n^2). You are looping through to access each number, then you are looping through the entire list at each number to check if it adds up to the target.
When you land on a ladder, snake, or over 100 do you still get a second roll if you rolled double? I'm a little confused on that rule. I am passing like 270 tests and failing like 20, but I am having trouble pin pointing my error.
I think finding a working solution in the first place is way tougher than a 6 kyu problem. I'm solving 4kyu problems way easier than this one.
I think my problem is that I am finding every possible sum then searching for the lowest number not included in the sums. I need to reverse that order. Start counting at 1 and return false if you can't find a combination of numbers that add up to that number. Kind of fatigued from working on this problem for now though but I will definitely return to it.
Read the posts below, it's been already asked and answered more than once.
False
is in the input value. The first of those is what your function returned, not the input.I'm confused by some of these tests. For instance
[1, None, 2, 1, 0, 0, 0] should equal [1, None, 2, False, 1, 0, 0]
Where is the False coming from and why are there less 0's in the result than there are in the orignal list? My code works as far as the instructions for this kata goes, there must be some hidden instructions that I am supposed to be able to figure out myself.