ByteDance Interview Question

DP related question for the long form final engineering round