Skip to content

Conversation

pfrontera
Copy link
Contributor

@pfrontera pfrontera commented Jul 12, 2022

I have replaced the usage of additional arrays as a crutch with an in-place sorting approach. This means that I modified the code to directly perform the sorting on the original array, instead of relying on extra arrays for assistance.

@pfrontera
Copy link
Contributor Author

Hi @egonSchiele, have you had a chance to take a look at it?
Thanks!

@egonSchiele
Copy link
Owner

@pfrontera I don't know much about C sharp, is there a reason to prefer an array over a List?

@pfrontera
Copy link
Contributor Author

Hi @egonSchiele , because behind the scene, when a list modifies its size is creating an array. This way I’m proposing I’m ordering the same reference/origin input without creating new lists for ordering on the way.

@pfrontera
Copy link
Contributor Author

I think its the same that @sergiovanovi made on java.

@pfrontera pfrontera changed the title SelectionSort csharp using array as input SelectionSort csharp in-place without creating a new array Jun 26, 2023
@pfrontera
Copy link
Contributor Author

Hi again @egonSchiele I believe there might have been some confusion in my previous description. I have now revised it to provide a more accurate explanation. Thanks

@pfrontera pfrontera changed the title SelectionSort csharp in-place without creating a new array C# selection sort implementation for in-place sorting without additional arrays Jun 26, 2023
@egonSchiele egonSchiele merged commit f53fe3b into egonSchiele:master Jul 19, 2023
@egonSchiele
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants