You are viewing a single comment's thread. Return to all comments →
Look up matrix exponentiation. Learn how to find the n-th term of a linear recurrence in O(log n) time.
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #116: Red, green or blue tiles
You are viewing a single comment's thread. Return to all comments →
Look up matrix exponentiation. Learn how to find the n-th term of a linear recurrence in O(log n) time.