Question d’entretien chez TikTok

Find sequence with largest difference in an array