Pregunta de entrevista de ByteDance

I cant remember the question specifically, but both involve greedy algorithm with priority q and binary search.