PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Note D for Hwk4
Date: Monday, 16 Mar 2020, 07:09:45


    > I have a question about Note D. When it says "the C*M does not include
    > recursive calls to quickSort" does it mean that whenever the quickSort is
    > called (either recursively or otherwise) we restart the counter that
    > counts the number of calls to addD()/pushD().

No.

Assume that the function that implements quickSort does
not call any function other than the string functions
strcmp(), strncmp(), and strlen(); the Deque functions;
and itself.  Then when it is given M items to sort, it
calls addD() or pushD() directly (versus in recursive
calls to itself) at most C*M times.

--Stan-
PREV INDEX NEXT