Pergunta de entrevista da empresa Adcole

How would you write a function to reverse a string? Code a function to find the smallest armstrong number under 1000.