Pregunta de entrevista de Tech Mahindra

Given three coding questions and asked to write a code for those