Update sorting/count_inversions.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Rakshit Raj
2020-12-02 23:27:21 +05:30
committed by GitHub
parent 6929f5ce80
commit d54a285f8d

View File

@@ -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);