Problem 2 of Array with Custom Solution