ByteDance interview question

Harsh Table, dynamic programming, etc.