Reversing a string:Non-recurrsive -Updated