Samsung Electronics interview question

How did you solve the problem?