Trace and reduce redundant curl requests | Circle Interview Question