Added an algorithm to reverse a string