note 84731 added to function.array-splice
| From: | loushou-life dot 42 at gmail dot com | Date: | Sun, 27 Jul 2008 23:39:14 +0000 |
| Subject: | note 84731 added to function.array-splice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142830@lists.php.net to get a copy of this message | ||
i miss posted the actual function...
here is the real one lol
<?php
function q_sort(&$Info, $Index, $Left, $Right)
{
echo "memory usage <b>".memory_get_usage()."</b><br/>\n";
$L_hold = $Left;
$R_hold = $Right;
$Pivot = $Left;
$PivotValue = $Info[$Left];
while ($Left < $Right)
{
while (($Info[$Right][$Index] >= $PivotValue[$Index]) && ($Left < $Right))
$Right--;
if ($Left != $Right)
{
$Info[$Left] = $Info[$Right];
$Left++;
}
while (($Info[$Left][$Index] <= $PivotValue[$Index]) && ($Left < $Right))
$Left++;
if ($Left != $Right)
{
$Info[$Right] = $Info[$Left];
$Right--;
}
}
$Info[$Left] = $PivotValue;
$Pivot = $Left;
$Left = $L_hold;
$Right = $R_hold;
if ($Left < $Pivot)
q_sort($Info, $Index, $Left, $Pivot-1);
if ($Right > $Pivot)
q_sort($Info, $Index, $Pivot+1, $Right);
}
?>
----
Server IP: 209.41.74.194
Probable Submitter: 68.108.11.69
----
Manual Page -- http://www.php.net/manual/en/function.array-splice.php
Edit -- https://master.php.net/note/edit/84731
Del: integrated -- https://master.php.net/note/delete/84731/integrated
Del: useless -- https://master.php.net/note/delete/84731/useless
Del: bad code -- https://master.php.net/note/delete/84731/bad+code
Del: spam -- https://master.php.net/note/delete/84731/spam
Del: non-english -- https://master.php.net/note/delete/84731/non-english
Del: in docs -- https://master.php.net/note/delete/84731/in+docs
Del: other reasons-- https://master.php.net/note/delete/84731
Reject -- https://master.php.net/note/reject/84731
Search -- https://master.php.net/manage/user-notes.php