有人通过ATT Primer 下单被cancel的吗?# PDA - 掌中宝
k*j
1 楼
网上找来的题目
You are given a pyramid; the numbers for example is 2 on the first level, 3
-1 on the second level, 4 7 8 on the third, etc. How do you calculate the
maximum sub sequence of any path traversing the pyramid?
应该是用DP,目前只能想到O(k^2)的做法,k是level数。有没有比这个更快的做法,多
谢!
You are given a pyramid; the numbers for example is 2 on the first level, 3
-1 on the second level, 4 7 8 on the third, etc. How do you calculate the
maximum sub sequence of any path traversing the pyramid?
应该是用DP,目前只能想到O(k^2)的做法,k是level数。有没有比这个更快的做法,多
谢!