Crate and Barrel Interview Question

One of the easy Leetcode questions