ByteDance interview question

LC 210. Course Schedule II