Source limit error

Getting source limit error in this question .

how to reduce source limit in code ?

link :

Here is link to my solution :

Approach : storing last digit of first 4 power of 1 to 20 (Eg 3^1,3^2,3^3,3^4)

in an array and then answering queries.

I just want to know how to remove source limit error??

please share your solution


this might be helpful!

1 Like

THanks !!!
btw i was able to reduce size by trying different approach!!

1 Like