Python CPP速解Leetcode 1137 N th Tribonacci Number
-----
First use recursion, add cache, and then convert to dynamic programming. Of course, you can also use matrix power to solve.
[codes on Leetcode]https://leetcode.com/problems/n-th-tribonacci-number/solutions/5064599/recursive-iterative-dp-vs-matrix-power-0ms-beats-100/
[Dynamic programming playlist]https://www.youtube.com/watch?v=30yq3fmE6E8&list=PLYRlUBnWnd5K_XYUesV9oc6M9ONXII61T
沒有留言:
張貼留言