Question: What is the worst-case complexity of the minCount function? class NameCounter { private: int* counts; int nc; string* names; int nN; public: }; NameCounter
What is the worst-case complexity of the minCount function? class NameCounter { private: int* counts; int nc; string* names; int nN; public: }; NameCounter (int nCounts, int nNames); int minCount() const; int NameCounter: :minCount() { } int min counts[0]; for (int i = 1; i < nc; ++i) if (counts[i] < min) min counts[i]; return min;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
