We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
2**i does calculate the exponentiation in O(n) time. If you use build in function in math library math.pow(x,n) then it calculates the power in O(logn) time. You can also create your own power function to calculate in O(logn) time.
Shashank and List
You are viewing a single comment's thread. Return to all comments →
2**i does calculate the exponentiation in O(n) time. If you use build in function in math library math.pow(x,n) then it calculates the power in O(logn) time. You can also create your own power function to calculate in O(logn) time.