diff --git a/add-timer-decorator.py b/Add-Timer-Decorator.py similarity index 100% rename from add-timer-decorator.py rename to Add-Timer-Decorator.py diff --git a/binarySearch.py b/BinarySearch.py similarity index 100% rename from binarySearch.py rename to BinarySearch.py diff --git a/breadth_first_search.py b/Breadth_First_Search.py similarity index 100% rename from breadth_first_search.py rename to Breadth_First_Search.py diff --git a/cheat sheet.py b/Cheat_Sheet.py similarity index 100% rename from cheat sheet.py rename to Cheat_Sheet.py diff --git a/checkLeapYear.py b/CheckLeapYear.py similarity index 100% rename from checkLeapYear.py rename to CheckLeapYear.py diff --git a/chess.py b/Chess.py similarity index 100% rename from chess.py rename to Chess.py diff --git a/Dijkstra's algorithm.py b/Dijkstra's_Algorithm.py similarity index 100% rename from Dijkstra's algorithm.py rename to Dijkstra's_Algorithm.py diff --git a/euclideanAlgorithm.py b/EuclideanAlgorithm.py similarity index 100% rename from euclideanAlgorithm.py rename to EuclideanAlgorithm.py diff --git a/even.py b/Even.py similarity index 100% rename from even.py rename to Even.py diff --git a/Face-Attendance-System/main.py b/Face-Attendance-System/Main.py similarity index 100% rename from Face-Attendance-System/main.py rename to Face-Attendance-System/Main.py diff --git a/Face-Attendance-System/Resources/background.png b/Face-Attendance-System/Resources/Background.png similarity index 100% rename from Face-Attendance-System/Resources/background.png rename to Face-Attendance-System/Resources/Background.png diff --git a/factorial recurssion.py b/Factorial_Recurssion.py similarity index 100% rename from factorial recurssion.py rename to Factorial_Recurssion.py diff --git a/kadanesAlgorithm.py b/KadanesAlgorithm.py similarity index 100% rename from kadanesAlgorithm.py rename to KadanesAlgorithm.py diff --git a/Kotlin/binarySearch.kt b/Kotlin/BinarySearch.kt similarity index 100% rename from Kotlin/binarySearch.kt rename to Kotlin/BinarySearch.kt diff --git a/Kotlin/fibonacciSeries.kt b/Kotlin/FibonacciSeries.kt similarity index 100% rename from Kotlin/fibonacciSeries.kt rename to Kotlin/FibonacciSeries.kt diff --git a/Kotlin/insertionSort.kt b/Kotlin/InsertionSort.kt similarity index 100% rename from Kotlin/insertionSort.kt rename to Kotlin/InsertionSort.kt diff --git a/Kotlin/linearSearch.kt b/Kotlin/LinearSearch.kt similarity index 100% rename from Kotlin/linearSearch.kt rename to Kotlin/LinearSearch.kt diff --git a/Kotlin/selectionSort.kt b/Kotlin/SelectionSort.kt similarity index 100% rename from Kotlin/selectionSort.kt rename to Kotlin/SelectionSort.kt diff --git a/leetcode-groupAnagrams.py b/Leetcode_GroupAnagrams.py similarity index 100% rename from leetcode-groupAnagrams.py rename to Leetcode_GroupAnagrams.py diff --git a/linkedlist.py b/LinkedlLst.py similarity index 100% rename from linkedlist.py rename to LinkedlLst.py diff --git a/lowerBoundAndUpperBound.py b/LowerBoundAndUpperBound.py similarity index 100% rename from lowerBoundAndUpperBound.py rename to LowerBoundAndUpperBound.py diff --git a/merge_sort.py b/Merge_Sort.py similarity index 100% rename from merge_sort.py rename to Merge_Sort.py diff --git a/prt.py b/Prt.py similarity index 100% rename from prt.py rename to Prt.py diff --git a/Python/Graphs/bfs.py b/Python/Graphs/Bfs.py similarity index 100% rename from Python/Graphs/bfs.py rename to Python/Graphs/Bfs.py diff --git a/Python/Graphs/dfs.py b/Python/Graphs/Dfs.py similarity index 100% rename from Python/Graphs/dfs.py rename to Python/Graphs/Dfs.py diff --git a/pythonlearn.py b/Pythonlearn.py similarity index 100% rename from pythonlearn.py rename to Pythonlearn.py diff --git a/Radix_Sorting_Method b/Radix_Sorting_Method new file mode 100644 index 0000000..16f926c --- /dev/null +++ b/Radix_Sorting_Method @@ -0,0 +1,37 @@ +# Radix sort is a non-comparative sorting algorithm that works by distributing elements into buckets based on their individual digits. It's particularly useful for sorting integers. Here's a Python implementation of radix sort: + + +def counting_sort(arr, exp): + n = len(arr) + output = [0] * n + count = [0] * 10 + + for i in range(n): + index = arr[i] // exp + count[index % 10] += 1 + + for i in range(1, 10): + count[i] += count[i - 1] + + i = n - 1 + while i >= 0: + index = arr[i] // exp + output[count[index % 10] - 1] = arr[i] + count[index % 10] -= 1 + i -= 1 + + for i in range(n): + arr[i] = output[i] + +def radix_sort(arr): + max_element = max(arr) + exp = 1 + + while max_element // exp > 0: + counting_sort(arr, exp) + exp *= 10 + +# Example usage +arr = [170, 45, 75, 90, 802, 24, 2, 66] +radix_sort(arr) +print("Sorted array:", arr) diff --git a/selection_sort.py b/Selection_Sort.py similarity index 100% rename from selection_sort.py rename to Selection_Sort.py diff --git a/sets b/Sets similarity index 100% rename from sets rename to Sets