VacuumLabs interview question

They asked an algorithm question