Skip to content

Commit 2524df0

Browse files
committed
polishing
1 parent c88081c commit 2524df0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/algorithms/explanations/MSDRadixSortExp.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
1818
most significant bit position in the array elements.
1919
* A *mask* is created that has a 1 in this bit position and 0 elsewhere. The
2020
mask is used to extract bits from keys during sorting.
2121
* The recursive sorting function ```RexsortRecursive``` is then called to
2222
sort the entire array starting with this mask. The mask is shifted to the
2323
right 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
2628
and 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

0 commit comments

Comments
 (0)