SimVentions Interview Question

Asked a Leetcode style algorithm challenge