mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-09 23:53:18 +08:00
Update sorting/count_inversions.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -125,7 +125,7 @@ uint64_t merge(T* arr, T* temp, uint64_t left, uint64_t mid, uint64_t right) {
|
||||
*/
|
||||
template <typename T>
|
||||
uint64_t mergeSort(T* arr, T* temp, uint64_t left, uint64_t right) {
|
||||
uint64_t mid = 0, inv_count = 0;
|
||||
uint32_t mid = 0, inv_count = 0;
|
||||
if (right > left) {
|
||||
// midpoint to split the array
|
||||
mid = (right + left) / 2;
|
||||
|
||||
Reference in New Issue
Block a user