Add solution and tests for sumOfMinAndMax