Pregunta de entrevista de Huawei Technologies

they asked me about one array leetcode in c++