Coding Exercise – Implement Pow(x, n) – C++ – Online Judge
October 27, 2013
algorithms, brute force, c / c++, implementation, interview questions, math, optimization, programming languages
No Comments
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 …