Algorithm For Reversing A String Using Stack