Problem 114 solved.
Problem 115 solved. Algorithm from 114 extracted to a method and used to solve 115.