# Is radix sort in-place or out-place?

Generally, we can implement algorithms in-place and out-of-place.

However, I can't say for certain that radix sort can be implemented in both ways.

• What prevents you from checking that? – Dmitry Apr 15 at 0:35
• @Dmitry well, it does not return a new array, but it does stores some variables. So I got my answer, 'it depends' (see Nathaniel's answer below) – Monther Apr 15 at 2:21
• Analyzing a piece of Python code is out-of-scope for this site. Coding and implementation-specific questions are off-topic here. – D.W. Apr 15 at 6:28
• @D.W. See my edit. – Monther Apr 15 at 22:24
• You should check en.wikipedia.org/wiki/… – Nathaniel Apr 15 at 22:42

• if you also want to use no additionnal data structure, or limit the additionnal space usage to be $$o(n)$$, then no, because of the creation of the arrays count and output.