IBM Interview Question

network request and general code alg