当前位置:网站首页>Jz71 jump step expansion problem
Jz71 jump step expansion problem
2022-07-25 18:14:00 【syc596】
JZ71 Step jump expansion problem
Step jump expansion problem _ Niuke Tiba _ Cattle from (nowcoder.com)
// // recursive
// public class Solution {
// public int jumpFloorII(int target) {
// if(target<=1){
// return 1;
// }
// return 2*jumpFloorII(target-1);
// }
// }
//11
// Dynamic gauge dp
public class Solution {
public int jumpFloorII(int target) {
int[] dp=new int[target+1];
dp[0]=1;
dp[1]=1;
for(int i=2;i<=target;i++){
dp[i]=2*dp[i-1];
}
return dp[target];
}
}边栏推荐
- Stm8s003f3 internal flash debugging
- Stm32f105rbt6 internal flash debugging
- 更新|3DCAT实时云渲染 v2.1.2版本全新发布
- 结合GHS MULTI使用瑞萨E1仿真器实现对瑞萨RH850单片机的仿真调试
- ORB_ Slam3 recurrence - Part I
- 大话DevOps监控,团队如何选择监控工具?
- Leetcode 101. symmetric binary tree & 100. same tree & 572. Subtree of another tree
- Oracle uses impdp import to report an error: ora-39001: invalid parameter value ora-39000: dump file description error ora-39088: file name cannot contain path description
- Pan domain name configuration method
- How many points did NPDP pass? How to pass with high scores?
猜你喜欢

Kendryte K210 在freertos上的lcd屏幕的使用

"Digital security" alert NFT's seven Scams

Creation of unity Bezier curve

Today's sleep quality record is 84 points

CVE-2022-33891 Apache spark shell 命令注入漏洞复现

Memory and packet buffer management of LwIP

"Jargon" | what kind of experience is it to efficiently deliver games with Devops?

Oracle使用impdp导入报错:ORA-39001: 参数值无效 ORA-39000: 转储文件说明错误 ORA-39088: 文件名不能包含路径说明

STM8S003F3 内部flash调试

Landmark buildings around the world
随机推荐
OV7725 yuv 640* [email protected] Profile
泛域名配置方法
Related operations of binary tree
Drawing PDF form (II) drawing excel form style in PDF through iText, setting Chinese font, watermark, logo, header and page number
Recognized by international authorities! Oceanbase was selected into the Forrester translational data platform report
The new version of 3dcat v2.1.3 has been released. You can't miss these three function updates!
网易严选库存中心设计实践
Good news! Ruiyun technology was awarded the member unit of 5g integrated application special committee of "sailing on the sea"
Joseph Ring problem
Drawing PDF tables (I) drawing excel table styles in PDF and downloading them through iText (supporting Chinese fonts)
Cloud VR: the next step of virtual reality specialization
Auditing related notes
3DCAT v2.1.3新版本发布,这三大功能更新你不容错过!
JZ32 从上往下打印二叉树
为什么数字化未来取决于3D实时渲染
Polynomial addition
TME2022校园招聘后台开发/运营开发/业务运维/应用开发笔试(I)编程题的一点自我分析
srec_ Use of common cat parameters
What is the relationship between cloud fluidization and cloud desktop
testng执行顺序的3中控制方法