TinaCristal's Blog


  • Home

  • Tags

  • Categories

  • Archives

  • Search

算法整理

Posted on 2020-04-09 |

青蛙跳

1
2
3
4
5
6
7
8
9
10
ef jumpFloor(n):
# 斐波那契初始化
fn = [1,1]

# 计算 f(n) = f(n-1) + f(n-2)
for i in range(n-1):
fn[0], fn[1] = fn[1], fn[0]+fn[1]

# 返回
return fn[-1]

https://blog.csdn.net/JockLiu/article/details/91830380

python学习笔记(八)
LeetCode-394.字符串解码
  • Table of Contents
  • Overview

TinaCristal

443 posts
57 categories
55 tags
GitHub E-Mail
  1. 1. 青蛙跳
© 2020 TinaCristal
Powered by Hexo
|
Theme — NexT.Mist v5.1.4