SQUADSTACK Hiring Challenge | Interview Question | On-Campus OA (2023)
Question · Posted Jun 2026
Problem: Count Total Ways to Reach the N-th Stair You are climbing a staircase with n steps. At each move, you can climb: 1 step 2 steps 3 steps Return the total number of distinct ways to reach the top. Example Input n = 4 Output 7 Explanation Possible ways: 1 + 1 + 1 + 1 1 + 1 + 2 1 + 2 + 1 2 + 1 + 1 2 + 2 1 + 3 3 + ...
The full answer & interview discussion are available to premium members.
Log in Create a free account