Pergunta de entrevista da empresa IDFC FIRST Bank

reversing a string in python and employee, manager self join SQL question