NVIDIA interview question

Problem solving.