AppsFlyer Interview Question

sliding window type of problem