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.
If you have known somthing about Complexity analysis, the time complexity of pow(x,y) is O(n2) , that means getting solution of single input you have about n2 ms. On the other hand, this method's time complexity is O(1) , that means getting solution of single input you have about only 1 ms .
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Summing the N series
You are viewing a single comment's thread. Return to all comments →
If you have known somthing about Complexity analysis, the time complexity of pow(x,y) is O(n2) , that means getting solution of single input you have about n2 ms. On the other hand, this method's time complexity is O(1) , that means getting solution of single input you have about only 1 ms .