Skip to content

Commit 47f58e4

Browse files
committed
docs: add counting sort image
1 parent 0cff81c commit 47f58e4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
22.6 KB
Loading

src/main/java/algorithms/sorting/countingSort/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ computes the prefix sum for the map. This prefix map tells us which position an
99
It is updated after each insertion to reflection the new position to insert the next time the same element is
1010
encountered. <br>
1111

12+
![counting sort img](../../../../../../docs/assets/images/CountingSort.png)
13+
Image Source: https://www.oreilly.com/library/view/mastering-algorithms-with/1565924533/ch12s13.html
14+
15+
_To align with the naming convention of our implementation, data => arr, counts => freq, temp => sorted._
16+
1217
### Implementation Invariant
1318

1419
**At the end of the ith iteration, the ith element (of the original array) from the back will be placed in

0 commit comments

Comments
 (0)