ByteDance Interview Question

Something to do with algorithm.