Domino And Tromino Tiling


Hi @Awice, my solution can run in LOGN, could you add my solution to this editorial?
I used Matrix multiplication
https://leetcode.com/problems/dominoandtrominotiling/discuss/116546/UsingrecurrenceLog(N)veryQuickLOG(N)injavacanrunwithN1000000000


@awice Ok, that is great. I just want to introduce leetcode user with better solution.


I've made a simple schema to explain visually the transition steps, it helped me to understand.


Hi, @awice, thank you for the solution, but I still can't understand solution 1. For example, if N = 2, then the final dp will be {2,2,2,3}, why do we return dp[0x00], and what does the other three numbers mean?


@awice Q1. why are you returning dp[0]? should not be dp[3], as last row should be completely filled.
Q2. ndp[3] can transit from dp[3] + vertical domino. why this case is not considered?