← Salesforce questions

Number of ways to climb staircase

Filed under Salesforce

A child is running up a staircase with N steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ways the child can run up the stairs.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Salesforce questions

Collected from public candidate posts and coding forums. Updated Nov 2026.