Micron Technology interview question

some optimization problem