Skip to content

Commit 2a65016

Browse files
committed
radix sort
1 parent f0aadb5 commit 2a65016

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,17 @@
530530

531531
![](https://github.com/aish21/Algorithms-and-Data-Structures/blob/main/Resources/Animations/counting-sort.gif)
532532

533+
### [Radix Sort](/Practice%20Concepts/Sorting/counting-sort.py)
534+
* Sorts the elements by first grouping the individual digits of the same place value. Then, sort the elements according to their increasing/decreasing order.
535+
* Method:
536+
- Find the largest element in the array
537+
- Find the number of digits of the largest element - calculated because we have to go through all the significant places of all elements.
538+
- Go through each significant place one by one
539+
* Time Complexity - Best, Average and Worst: O(n + k)
540+
* Space Complexity - O(max)
541+
542+
![](https://github.com/aish21/Algorithms-and-Data-Structures/blob/main/Resources/Animations/radix-sort.gif)
543+
533544
## Search Algorithms
534545
<p align="center">
535546
<a href="#linear-search">Linear Search</a> •
122 KB
Loading

0 commit comments

Comments
 (0)