InterNations interview question

Optimization database question