注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
萌新今天开贴。为补全自己编程能力短板, 记录刷题日常和心得。谢谢!
- 53: maximum-sum-subarray:
1) Try brute-force method: o(n^3).
2) Try prefixsum method: o(n^2).
3) Try improved prefixsum method: o(n) (need to track minimum sum for current caluclated prefix sum s(k) ).
4) Haven't try "Divide and Conquer" Method or "Dynamic Programming" due to lack of basic knowledge.
1) Brute-force method: o(n).
2) Recursion: o(log(n)).
3) Haven't gotten time to check other better methods, shall come back later.
|