Gorgias (CA) Interview Question

Similar to Array Manipulation easy problems on Leetcode