Question d’entretien chez TikTok

Find the largest consecutive sum in an array.

Réponse à la question d'entretien

Utilisateur anonyme

13 janv. 2023

I used a linear time algorithm that iterated through the array while keeping track of a current sum and a globalMax.