Can i know the space complexity of this dnf sort algorithm

Can i know the space complexity of this dnf sort algorithm

Time Complexity is O(n)…since you are traversing the array only once.
No extra space is taken , so space complexity is O(1)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.