ByteDance interview question

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