mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-29 13:03:58 +08:00
feat: Add sorting/count_inversions.cpp (#1425)
* Create count_inversions.cpp Counts the number of inversions in a list using merge sort. The number of Inversions in a list is the measure of the list's proximity to being sorted in ascending/increasing order. * Update count_inversions.cpp - fixed template error on line 156 - an added test case for character array - an added test case for list type double * Update sorting/count_inversions.cpp Co-authored-by: Taj <tjgurwara99@users.noreply.github.com> * Update sorting/count_inversions.cpp Co-authored-by: Taj <tjgurwara99@users.noreply.github.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * updating DIRECTORY.md * clang-format and clang-tidy fixes forb51af5e8* using `uint64_t` from cstdint header and doxygen formatiing * clang-format and clang-tidy fixes for047578bb* Update count_inversions.cpp * added comments on imports * clang-format and clang-tidy fixes for2f65017d* Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update count_inversions.cpp * clang-format and clang-tidy fixes for5d5cc53e* Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update count_inversions.cpp * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update sorting/count_inversions.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update count_inversions.cpp * clang-format and clang-tidy fixes for121ce330* Update sorting/count_inversions.cpp Co-authored-by: John Law <johnlaw.po@gmail.com> Co-authored-by: Taj <tjgurwara99@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
@@ -255,6 +255,7 @@
|
||||
* [Bucket Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/bucket_sort.cpp)
|
||||
* [Cocktail Selection Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/cocktail_selection_sort.cpp)
|
||||
* [Comb Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/comb_sort.cpp)
|
||||
* [Count Inversions](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/count_inversions.cpp)
|
||||
* [Counting Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/counting_sort.cpp)
|
||||
* [Counting Sort String](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/counting_sort_string.cpp)
|
||||
* [Cycle Sort](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/sorting/cycle_sort.cpp)
|
||||
|
||||
Reference in New Issue
Block a user