https://hack.codingblocks.com/contests/c/547/846
Getting one wrong ans out of 5 test cases !
Whats wrong.
i did using matrix exponentiation making linear recurrence as
f(n)=(l-2)f(n-1) + (l-1)f(n-2)
where l is the length of arr,
Link to my code
https://ide.codingblocks.com/s/43398