KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I implemented this function power() which takes two arguments a and b and computes a b . typedef long long int LL; LL power(int a,int b) { int i = 1; LL pow = 1; for( ; i <= b ; ++i ) pow *= a; return pow; } Given : a b falls in the range of long long int . Problem : How to reduce the time complexity of my algorithm?
Tags (comma-separated)
Save Edits
Cancel