Calculate Execution Times in Sort algorithm
问题 I implemented Merge Sort and Quick Sort in C++, and I wanna get the execution times using each of two with many of cases those are already Sorted or not & has different size. #include <iostream> #include <ctime> #include <vector> #include <algorithm> using namespace std; void Merge(vector<int>& s, int low, int mid, int high) { int i = low; int j = mid + 1; int k = low; vector<int> u(s); while (i <= mid && j <= high) { if (s.at(i) < s.at(j)) { u.at(k) = s.at(i); i++; } else { u.at(k) = s.at(j)