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.
If you're looking for NodeJS built-in modules, then take a look at NodeJS v18 API docs
Here: https://docs.codewars.com/languages/javascript#node-modules
A typo happens when you want to write something and write something else instead, in this case,
strng
is the intended value, so no, it's not a typo.No it's not. It's a var name.
Note that you can start at first or second step. Likewise you can end at last or second to last step. In the order given in the description:
climbing_stairs([0, 2, 2, 1]) ➞ 2
The cheapest route is the first (index-0) and third step (index-2). So 0 + 2 = 2.
An alternative route is the second (index-1) and third step (index-2). So 2 + 2 = 4, but that is more expensive than the first route.
Another alternative route is the second (index-1) and fourth step (index-3). So 2 + 1 = 3, but that is also more expensive than the first route.
climbing_stairs([0, 2, 3, 2]) ➞ 3
The cheapest route is the first (index-0) and third step (index-2). So 0 + 3 = 3.
climbing_stairs([10, 15, 20]) ➞ 15
The cheapest route is the second step (index-1). So the cost is just 15.
climbing_stairs([0, 0, 0, 0, 0, 0]) ➞ 0
Here the cheapest route is any legal route as all "jumps" are free.
the image is stored on a Russian server; your country may be blocking Russian websites
I do, it's a man laying unconscious at the beach holding a barrel in its arm. Maybe you're blocking the image host or something?