Comcast interview question

Data structure and algorithms code