mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-02 02:02:23 +08:00
Update sorting/count_inversions.cpp
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
halves of
|
||||
* the array are merged, create two indices i and j, i is the index for
|
||||
first half
|
||||
* and j is an index of the second half. if a[i] is greater than a[j], then
|
||||
* and j is an index of the second half. if `a[i]` is greater than `a[j]`, then
|
||||
there are (mid – i)
|
||||
* inversions, Because left and right subarrays are sorted, so all the
|
||||
remaining elements
|
||||
|
||||
Reference in New Issue
Block a user