Pergunta de entrevista da empresa Sigmoid

Given a binary string find max length of substring having equal number of zero and one