Author: Stan Eisenstat
Subject: Re: [Cs223] Stats.pl
Date: Thursday, 02 Apr 2020, 18:57:03
> Message Posted By: Unknown
>
> When I try to run Stats.pl on QsortH of the staff solution, it only shows
> #lines & #compares, and not #remD()
The number of remD()'s is just under 2*#compares+N.
=====
> The staff solution uses about 1/3 of the #compares than my solution.
> However, for my solution My #calls to remD() is about half of
> 2*(#compares+#lines), should I be worried about efficiency?
Probably. If your solution uses C compares, then it
calls remD() about C+N times. But Hwk4/Qsort uses C/3
compares and calls remD() about 2*(C/3+N) times; thus
the limit for passing Test #404 is 2/3 * C + 2*N, which
is significantly smaller C+N.
Have you tested your QsortH with xQuick.pl?
For me to say more, I need to see and run your code.
--Stan-
PREV
INDEX
NEXT