Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bas Jobsen  >  Quicksort  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Quicksort
Quicksort produces a sorted sequence of a array
Author: By
Last change:
Date: 2002-09-07 12:28
Size: 316 bytes
 

Contents

Class file image Download
<?
include('Quicksort.php');
$QS=new Quicksort;
$array=array('8','10','2','1','1','6','5','5','3');

$part=$QS->QS_get($array,2,5);

for(
$i=0;$i<count($part);$i++)
        echo 
$part[$i]."\n";

echo 
"\n";

$QS->Quick_sort($array,0,count($array)-1);
for(
$i=0;$i<count($array);$i++)
        echo 
$array[$i]."\n";
?>