mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-12 23:15:52 +08:00
Update sorting/count_inversions.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -145,6 +145,7 @@ uint64_t mergeSort(T* arr, T* temp, uint32_t left, uint32_t right) {
|
||||
* how close or far off the array is to being sorted.
|
||||
*
|
||||
* @details
|
||||
* @details
|
||||
* Number of inversions in a sorted array is 0.
|
||||
* Number of inversion in an array[1...n] sorted in
|
||||
* non-ascending order is n(n-1)/2, since each pair of elements
|
||||
|
||||
Reference in New Issue
Block a user