Tag: online judge

Coding Exercise – Implement Pow(x, n) – C++ – Online Judge

Source: http://oj.leetcode.com/problems/powx-n/ Implement Pow(x, n) which computes The given parameter x is a 64-bit double and n is a 32-bit integer. The quick solution may be so obvious, using bruteforce, iterate n times that multiplies x and gives a straightforward result. class Solution …