作者sean72 (.)
看板Python
标题[问题] 时间复杂度分析
时间Tue Jul 10 16:50:05 2018
https://leetcode.com/problems/different-ways-to-add-parentheses/description/
https://paste.ubuntu.com/p/j8vFpgbd44/
暴力解写出来,但是不会分析这个暴力解的时间复杂度
请高手帮忙指点
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 172.89.32.145
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1531212610.A.0BF.html
1F:推 handsomeLin: 小弟估算是四次方或五次 07/10 17:30
2F:推 handsomeLin: 估计是五次吧 一个n loop 里面牵1+到n的n^2=n^4 tota 07/10 17:39
3F:→ handsomeLin: l n^5 07/10 17:39
4F:推 cutekid: n=1,2,3,4,5,6...f(n)=1,2,6,18,54,162...t(n)=3^n 07/11 10:03