Problem 15, 16, 17 of Arrays with Custom Solution