Problem 3 solution added. ~0.14 s running time.