Skip to content

Commit 2db13c8

Browse files
initial commit
1 parent 4b2144a commit 2db13c8

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

‎Algorithm/Sorting algorithm/radix-sort/concept.md‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ Let's start by counting the occurrences of each tens digit.
328328

329329
### Correctly Sorted Array by Tens Place
330330

331-
The final output which is the array sorted by the tens place should now be:
331+
The final output, which is the array sorted by the tens place, should now be:
332332
```
333333
[3, 9, 10, 27, 38, 43, 82]
334334
```
@@ -365,13 +365,15 @@ Consider sorting by the ones place with the array:
365365

366366
2. Count the occurrences of each ones digit:
367367
```
368-
38 -> 8 => count[8]++
369-
27 -> 7 => count[7]++
370-
43 -> 3 => count[3]++
371-
3 -> 3 => count[3]++
372-
9 -> 9 => count[9]++
373-
82 -> 2 => count[2]++
374-
10 -> 0 => count[0]++
368+
Number -> one-th value => count increment
369+
370+
38 -> 8 => count[8]++
371+
27 -> 7 => count[7]++
372+
43 -> 3 => count[3]++
373+
3 -> 3 => count[3]++
374+
9 -> 9 => count[9]++
375+
82 -> 2 => count[2]++
376+
10 -> 0 => count[0]++
375377
```
376378

377379
Resulting count array:

0 commit comments

Comments
 (0)