I didn't think the problem was related to data science so it took me a good 10 minutes to just figure out what he meant. After the interview I realized this was actually a homework problem I did in an optimization class 6 years ago, so ironically I'd have performed better when I knew nothing about programming and big data than I do now.