Pergunta de entrevista da empresa Tata Consultancy Services

writing a code for some algorithm.