Samsung Electronics Interview Question

It was a formal coding test like leet code but in larger scale.