[LeetCode] Find Number of Ways to Reach the K-th Stair

1 · · May 19, 2024, 2:53 a.m.
Summary
3154. Find Number of Ways to Reach the K-th Stair You are given a non-negative integer k. There exists a staircase with an infinite number of stairs, with the lowest stair numbered 0. Alice has an integer jump, with an initial value of 0. She starts on stair 1 and wants to reach stair k using any number of operations. If she is on stair i, in one operation she can: Go down to stair i - 1. This operation cannot be used consecutively or on stair 0. Go up to stair i + 2jump. And then, jump become...