动态规划
跳台阶
http://www.nowcoder.com/questionTerminal/8c82a5b80378478f9484d87d1c5f12a4
public int JumpFloor(int target) { if (target <= 2){ return target; } int pre_1 = 2; int pre_2 = 1; int nums = 0; for (int i = 3; i <= target; i++) { nums = pre_1 + pre_2; pre_2 = pre_1; pre_1 = nums; } return nums; }