Ad
  • Custom User Avatar

    If you're looking for NodeJS built-in modules, then take a look at NodeJS v18 API docs

  • Custom User Avatar
  • Custom User Avatar

    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.

  • Custom User Avatar

    No it's not. It's a var name.

  • Default User Avatar

    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.

  • Default User Avatar

    the image is stored on a Russian server; your country may be blocking Russian websites

  • Custom User Avatar

    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?