TheAlgorithms-C-Plus-Plus/sorting
Rakshit Raj 1f5ca99571
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 for b51af5e8

* using `uint64_t` from cstdint header 

and doxygen formatiing

* clang-format and clang-tidy fixes for 047578bb

* Update count_inversions.cpp

* added comments on imports

* clang-format and clang-tidy fixes for 2f65017d

* 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 for 5d5cc53e

* 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 for 121ce330

* 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>
2020-12-15 20:33:04 -06:00
..
bead_sort.cpp fix: Various LGTM fixes 2020-06-23 15:13:28 -05:00
bitonic_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
bogo_sort.cpp Fixed an issue related to doc (doxygen) (#960) 2020-07-19 14:42:01 -04:00
bubble_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
bucket_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
CMakeLists.txt Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
cocktail_selection_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
comb_sort.cpp fix: Revert comb_sort changes 2020-06-23 15:26:55 -05:00
count_inversions.cpp feat: Add sorting/count_inversions.cpp (#1425) 2020-12-15 20:33:04 -06:00
counting_sort_string.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
counting_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
cycle_sort.cpp feat: Add ncr mod p code (#1325) 2020-11-22 23:05:01 +05:30
gnome_sort.cpp [feature] Gnome sort (#956) 2020-07-18 17:16:45 -04:00
heap_sort.cpp fix: minor docs issue 2020-06-25 03:39:12 +05:30
insertion_sort.cpp fix to upper case 2020-07-01 13:08:41 -04:00
library_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
merge_insertion_sort.cpp feat: Added merge-insertion sort from #246 (#1062) 2020-09-03 08:51:30 -04:00
merge_sort.cpp fix: short a bit the code (sorting/merge_sort.cpp) (#1066) 2020-09-27 15:53:47 -05:00
non_recursive_merge_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
numeric_string_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
odd_even_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
pancake_sort.cpp [fix/docs]: Improve backtracking/n_queens_all_solution_optimised.cpp (#1041) 2020-10-19 14:59:20 -05:00
pigeonhole_sort.cpp feat: add Pigeonhole algorithm (#1028) 2020-08-25 18:57:24 -05:00
quick_sort_3.cpp [feature] new implementation of Quick sort (#958) 2020-07-20 21:12:31 -04:00
quick_sort.cpp formatting source-code for f541be9724 2020-06-19 16:10:22 +00:00
radix_sort2.cpp feat: Add ncr mod p code (#1325) 2020-11-22 23:05:01 +05:30
radix_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
selection_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
shell_sort2.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
shell_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
slow_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
strand_sort.cpp Added strand sort algorithm (#1081) 2020-09-30 12:21:25 -05:00
swap_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
tim_sort.cpp Major rework to improve code quality and add automation checks (#805) 2020-06-19 21:34:56 +05:30
wiggle_sort.cpp feat: Add ncr mod p code (#1325) 2020-11-22 23:05:01 +05:30