楼主: igs816
3437 14

[其他] Dynamic Programming for Coding Interviews [推广有奖]

泰斗

5%

还不是VIP/贵宾

-

威望
9
论坛币
2694415 个
通用积分
18514.7219
学术水平
2744 点
热心指数
3467 点
信用等级
2560 点
经验
484578 点
帖子
5415
精华
52
在线时间
3589 小时
注册时间
2007-8-6
最后登录
2024-4-25

高级学术勋章 特级学术勋章 高级信用勋章 特级信用勋章 高级热心勋章 特级热心勋章

楼主
igs816 在职认证  发表于 2017-1-22 22:31:09 |只看作者 |坛友微信交流群|倒序 |AI写论文
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Dynamic Programming for Coding Interviews - A Bottom-Up approach to problem solv.jpg Dynamic Programming for Coding Interviews: A Bottom-Up approach to problem solving by Meenakshi
English | 16 Jan. 2017 | ISBN: 1946556696 | 142 Pages | PDF (conv) | 43 MB
I wanted to compute 80th term of the Fibonacci series.


int fib(int n){

return (1==n || 2==n) ? 1 : fib(n-1) + fib(n-2);

}

and waited                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        for the result. I wait and wait and wait

With an 8GB RAM and an Intel i5 CPU, why is it taking so long? I terminated the process and tried computing the 40th term. It took about a second. I put a check and was shocked to find that the above recursive function was called 204,668,309 times while computing the 40th term.

More than 200 million times? Is it reporting function calls or scam of some government?

The Dynamic Programming solution computes 100th Fibonacci term in less than fraction of a second, with a single function call, taking linear time and constant extra memory.

A recursive solution, usually, neither pass all test cases in a coding competition, nor does it impress the interviewer in an interview of company like Google, Microsoft, etc.

The most difficult questions asked in competitions and interviews, are from dynamic programming. This book takes Dynamic Programming head-on. It first explain the concepts with simple examples and then deep dives into complex DP problems.

本帖隐藏的内容

Dynamic Programming for Coding Interviews - A Bottom-Up approach to problem solving.pdf (41.97 MB, 需要: 5 个论坛币)



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Programming Interviews Interview Program Dynamic problem return wanted

本帖被以下文库推荐

沙发
kavakava 在职认证  发表于 2017-1-22 23:02:51 |只看作者 |坛友微信交流群
thanks

使用道具

藤椅
oranges03 发表于 2017-1-23 02:28:11 |只看作者 |坛友微信交流群
thanks!

使用道具

板凳
Enthuse 发表于 2017-1-23 02:46:48 |只看作者 |坛友微信交流群
thanks ...

使用道具

报纸
沙耶加 发表于 2017-1-23 08:01:55 |只看作者 |坛友微信交流群

使用道具

地板
python爱好者 发表于 2017-1-23 08:34:02 |只看作者 |坛友微信交流群
Dynamic Programming for Coding Interviews

使用道具

7
ermutuxia 发表于 2017-1-23 11:20:14 |只看作者 |坛友微信交流群
Wonderful

使用道具

8
franky_sas 发表于 2017-1-23 12:20:05 |只看作者 |坛友微信交流群

使用道具

9
duner1 发表于 2017-1-23 14:49:30 |只看作者 |坛友微信交流群
谢谢楼主!

使用道具

10
soccy 发表于 2017-1-23 23:41:57 |只看作者 |坛友微信交流群
......

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jr
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 18:29