UiPath Interview Question

Write an algorithm to reverse an string