Pregunta de entrevista de Arista Networks

Divide and conquer problem in C++