Urban Insight Interview Question

Complete the following programming challenge.