PEAK6 interview question

Similar problems to Leetcode