Comcast Interview Question

some questions regarding algorithm design