Pregunta de entrevista de ByteDance

leetcode coding, stocks questions,the third one