Pergunta de entrevista da empresa Google

They asked Two sub array problem