[C++] QuickSort and CountingSort solutions
Here are two C++ soltuions with different runtimes:\n1. QuickSort: Runtime: 68 ms, Memory Usage: 12.6 MB\n\n    void quickSort(vector<int>& V, int from, int to)
Here are two C++ soltuions with different runtimes:\n1. QuickSort: Runtime: 68 ms, Memory Usage: 12.6 MB\n```\n    void quickSort(vector<int>& V, int from, int to) {\n       if (from + 1 >= to) return;\n       // choose random pivot:\n       int piv = V[from + rand() % (to - from)];\n       \n       int i = from - 1, j = to;\n       while (true) {\n          do i++; while (V[i] < piv);\n          do j--; while (V[j] > piv);\n          if (i >= j) break;\n          swap(V[i], V[j]);\n       }\n       quickSort(V, from, j + 1);\n       quickSort(V, j + 1, to);\n    }\n\n    vector<int> sortArray(vector<int>& nums) {\n      quickSort(nums, 0, nums.size());\n      return nums;\n    }\n```\n2. CountingSort: Runtime: 44 ms, Memory Usage: 13 MB\n```\nvector<int> sortArray(vector<int>& nums) {\n   int n = nums.size();\n   int minEl = nums[0], maxEl = nums[0];\n   for (int i = 1; i < n; ++i) {\n      if (minEl > nums[i]) minEl = nums[i];\n      if (maxEl < nums[i]) maxEl = nums[i];\n   }\n   vector<int> C(maxEl - minEl + 1);\n   for (int i : nums) ++C[i - minEl];\n   int j = 0;\n   for (int i = 0; i < C.size(); ++i) {\n      int el = i + minEl;\n      int &cnt = C[i];\n      while (cnt--) nums[j++] = el;\n   }\n   return nums;\n}\n```
[]