You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By defining expmod the way Louis has, the process changes from linear recursive to tree recursive. The depth of tree grows logarithmically and the number of nodes is exponential. Therefore the whole process becomes O(n)