Guidewire Interview Question

normal leetcode (easy - medium)