mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-09 15:43:48 +08:00
Update sorting/count_inversions.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -156,7 +156,7 @@ uint64_t mergeSort(T* arr, T* temp, uint64_t left, uint64_t right) {
|
||||
* @returns number of inversions in input array, sorts the array
|
||||
*/
|
||||
template <class T>
|
||||
int countInversion(T* arr, const uint64_t size) {
|
||||
uint32_t countInversion(T* arr, const uint16_t size) {
|
||||
std::vector<T> temp;
|
||||
temp.reserve(size);
|
||||
temp.assign(size, 0);
|
||||
|
||||
Reference in New Issue
Block a user