85

JavaScript经典面试题(一) - 简书

 6 years ago
source link: https://www.jianshu.com/p/6ecf228c931f
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一: 记忆化斐波那契函数(Memoization) 题目:斐波那契数列指的是类似于以下的数列: 1, 1, 2, 3, 5, 8, 13, .... 也就是,第 n 个数由数列的前两个相加而来:f(n) = f(n - 1) + f(n -2) 请你完成 fibonacci 函数,接受 n 作为参数,可以获取数列中第 n 个数,例如: ... 测试程序会从按顺序依次获取斐波那契数列中的数,...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK