Updated interview problem