Solving
Using the iterative algorithm from wikipedia