File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/algorithms/explanations Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,17 @@ most) bit of each key and working down to the least significant bit.
1313
1414## The algorithm
1515
16- ### 1. Initial Setup:
16+ ### 1. Initial Setup
1717* The ``` Rexsort ``` function sets up the sorting process by determining the
1818most significant bit position in the array elements.
1919* A * mask* is created that has a 1 in this bit position and 0 elsewhere. The
2020mask is used to extract bits from keys during sorting.
2121* The recursive sorting function ``` RexsortRecursive ``` is then called to
2222sort the entire array starting with this mask. The mask is shifted to the
2323right for recursive calls.
24- ### 2. Recursive Sorting:
24+ ### 2. Recursive Sorting
25+ This has a very similar structure to the quicksort algorithm.
26+
2527* The ``` RexsortRecursive ``` function works on sub-arrays, defined by a left
2628and right index, and additionally has the current mask as a parameter.
2729* If the sub-array contains no more than one element or the mask is 0, the
You can’t perform that action at this time.
0 commit comments