EGYM Interview Question

An data structure coding problem to solve in Google docs.