WHAT IS THE FUNCTION TYPE?

why the function is void type if it is returning us sorted array by swapping ?
why it is not int[ ] type return function?

@varenatray_316d1f71b9922ccb The function is changing the array which is initialised already. The function is not creating a new array it is just updating already existing array so doesn’t need to return it.

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.