Question d’entretien chez Levrx

Given a sentence as a String, reverse it. Write code that can differentiate spaces, leading or trailing.