Solution 1: accepted
Binary search.
|
|
Solution 2: accepted
Newton method. Can also be used on other polynomial equations (please save my poor math).
Mathmatical reference: http://www.matrix67.com/blog/archives/361
|
|
Binary search.
|
|
Newton method. Can also be used on other polynomial equations (please save my poor math).
Mathmatical reference: http://www.matrix67.com/blog/archives/361
|
|