Question d’entretien chez Google

Review x code that determine the high water mark. How would you improve the code