Minimize travel cost with two cities | Bloomberg Interview Question