Pergunta de entrevista da empresa Marlabs

one sql question and one algorithm