Time and Space complexity of Radix Sort Algorithm Last Updated : 23 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report The Radix Sort Algorithm has a time complexity of O(n*d), where n is the number of elements in the input array and d is the number of digits in the largest number. The space complexity of Radix Sort is O(n + k), where n is the number of elements in the input array and k is the range of the input. This algorithm is efficient for sorting integers, especially when the range of values is not significantly larger than the number of elements to be sorted. ComplexityRadix Sort AlgorithmTime ComplexityO(n*d)Space ComplexityO(n + k) Let's explore the detailed time and space complexity of the Radix Sort Algorithm: Time Complexity of Radix Sort Algorithm:Best Case Time Complexity: O(n*d) The best-case time complexity of Radix Sort is O(n*d), where n is the number of elements in the input array and d is the number of digits in the largest number.In the best case, Radix Sort performs similarly to the average case, as it processes all digits of all elements.Average Case Time Complexity: O(n*d) The average-case time complexity of Radix Sort is O(n*d).Radix Sort processes each digit of each element in the input array, making its time complexity linear with respect to the number of elements and digits.Worst Case Time Complexity: O(n*d) The worst-case time complexity of Radix Sort is O(n*d).In the worst case, when all elements have the same digits or the digits are in reverse order, Radix Sort still needs to process each digit of each element.Auxiliary Space of Radix Sort Algorithm:The space complexity of Radix Sort is O(n + k), where n is the number of elements in the input array and k is the range of the input.Radix Sort requires additional space for the buckets used during sorting and for storing the sorted output.The space complexity can be higher when dealing with a large range of input values. Create Quiz Comment T tarunsarawgi_gfg Follow 1 Improve T tarunsarawgi_gfg Follow 1 Improve Article Tags : Analysis of Algorithms DSA Data Structures and Algorithms-QnA Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 3 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 15 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 1 min read Problem of The Day - Develop the Habit of Coding 5 min read Like