Samsung Electronics Interview Question

I couldn't pass to the interview. I only did the coding test.