Pergunta de entrevista da empresa LTIMindtree

2 coding questions based on logics.