Question d’entretien chez Amazon

DSA question based on array but very difficult