is a**n O(1) or is it O(n) hence called recursively in python compiler?

46 Views Asked by At

Is a**n similar to pow(a,n) in time complexity hence called recursively or is it linear time as it is a mathematical expression that might be computed directly ?

They provide similar time() o/p in smaller inputs but varying in larger ones but that may not indicate a complexity difference so i'm not sure

0

There are 0 best solutions below