Pergunta de entrevista da empresa DXC Technology

They asked me to code for two problem statements