PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Does your Qsort implement quickSort
Date: Monday, 30 Mar 2020, 17:29:19


I wrote a tool Hwk4/Tests/xQuick.pl that examines the
sequence of comparisons that Qsort makes and attempts to
determine whether or not the sequence is compatible with
an implementation of quickSort.  You can run it as

  % /c/cs223/Hwk4/Tests/xQuick.pl /c/cs223/Hwk4/Tests/f007

(where Tests/f007 can be replaced by any other file with
unique lines).

The tool is VERY fragile, so before trying it make sure
that your Qsort can correctly sort the file, e.g., by
running

  % ./Qsort /c/cs223/Hwk4/Tests/f007 | sort -c

Please let me know if your Qsort works but xQuick.pl
says that it is not quickSort.  Having examples where it
fails will help in debugging.  Thanks.

--Stan-
PREV INDEX NEXT