Format the code.
Solve problem 4 and provide benchmarking example using JMH.