Author: Unknown
Subject: #compares
Date: Monday, 30 Mar 2020, 18:17:05
I've been messing around with Hwk4/Stats.pl for a while, and it seems that #compares is calculated by counting the number of calls Qsort makes to strncmp. So are we also limited on how many times our Qsort calls strncmp as well? Or will that be tested by seeing if our Qsort is actually quicksort, i.e. follows a Qsort pattern? Otherwise, if we just throw in a bunch of random strncmps, wouldn't #compares just go up with it? I guess what I'm asking is, how is #compares calculated in Stats.pl? When I run /c/cs223/Hwk4/Tests/Stats.pl /c/cs223/Hwk4/Tests/f007 /c/cs223/Hwk4/Tests/f057 I get 410 compares instead of 351, which is what appeared here when Professor Eisenstat used it.PREV INDEX NEXT