Tiling Problem R

// Given a wall of size of 4 * n and tiles of size(1,4) and (4,1)

// How many ways you could u build the wall

// f(n) = f(n-4) + f(n-1)
I have solved the question using recursion and Dp but when I attempt Matrix Exponentiation I am getting a different answer …Could you please look into my Code


I have updated your code(you can refer the comments made in that code as well, you will understand what I meant) , try run that code , if you have further comments please let me know
Otherwise please close this doubt and rate!! I hope I have cleared the doubt!

@Neilketchum I have enclosed the link of updated code in my last comment made

With regards—
-@rkrishna