题解 | #跳台阶扩展问题#

跳台阶扩展问题

http://www.nowcoder.com/practice/22243d016f6b47f2a6928b4313c85387

public class Solution { public int jumpFloorII(int target) { if(target == 1) return 1;

	int num = 1;
	for(int i = target-1;i > 0;i--) {
		num += jumpFloorII(i);
	}
	
	return num;
}

}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务