Domanda di colloquio di ByteDance

The interviewer asked 3 dynamic programming questions with increasing difficulty, and one about data stream