Disney+ Hotstar interview question

Some dynamic programming and graph problems