There are n steps to the top of the stairs. You may climb either 1 or 2 steps each time you journey up the stairs. How many ways can you climb?
There are n steps to the top of the stairs. You may climb either 1 or 2 steps each time you journey up the stairs. How many ways can you climb?
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: easy
标签: interviewbit, genc, topic-specific, general-programming
参考答案摘要
We can arrive at the solution to this problem by counting the number of different steps we must take to reach the top of a staircase. We can take one step and two steps to get there, but this would be...
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。