Pergunta de entrevista da empresa Tata Consultancy Services

Two coding questions in the interview they were easy-medium leetcode.