â€śOn the other hand, because the number of swaps between elements is minimal (O(n)), it is suitable for sorting when the swapping speed is very slow.â€ť - What does â€śitâ€ť refers to here? Selection sort?

can someone clarify this statement ? I am finding it confusing as well.

Because selection sort only swaps 1 element per cycle (picks the smallest and puts at top of list), instead of how bubble/insertion sort make many swaps per cycle, its beneficial to use selection sort if your swapping speed is slow and your iterating over array speed is faster. Though iâ€™m not sure when would this scenario happen in real life. Maybe on certain hardware types?

Merge Sort can be a in place sort instead of creating subarray. I think is missing this.

And what about cycle sort. This approach can be used in questions like elements between 1-N and 0-N and can be sorted in o(n) time.

"Insertion sort and bubble sort are both stable, so they are helpful in situations where stability is essential, like sorting lines of excel sheets by one column.

On the other hand, because the number of swaps between elements is minimal (O(n)), it is suitable for sorting when the swapping speed is very slow."

Sorry, which of the sorts is â€śitâ€ť referring to here?

havenâ€™t heard about it until now. itâ€™s nice to know but I donâ€™t think youâ€™d need it for interviews.

in-place merge sort is very hard to implement and is more of the topic of academic research. I wouldnâ€™t worry about it for interviews. It may even confuse less technical interviewers XD

https://en.wikipedia.org/wiki/Merge_sort#In-place_merge_sort

â€śA problem with the above quick sort implementationâ€ť I could not find the quick sort implementation, is it covered anywhere?

Where is the editor that the page says is at the top of the page? I am using Safari browser and donâ€™t see it. Am I missing something?

I have the same question. Not seeing any editor here.