=0; $index--)
{
$result[strlen($word)-1 - $index] = $word[$index];
}
return implode("", $result);
}
// O(n/2) times = O(n) times
function reverse2($word)
{
$temp = "";
if(strlen($word)%2 == 1)
$stop = strlen($word)/2;
else
$stop = strlen($word)/2-1;
for ($index = 0; $index