Walt Disney Company interview question

Typical LeetCode easy. Some basic Java data structures.