"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
I presume you know why? That is the same as the modified merge sort Stephan mentioned.Michael Krimgen wrote:Java uses TimSort for Objects: . . .
Campbell Ritchie wrote:
I presume you know why? That is the same as the modified merge sort Stephan mentioned.Michael Krimgen wrote:Java uses TimSort for Objects: . . .
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
D.J. Quavern wrote:If aliceOne is in the right position in the array
Stephan van Hulst wrote:
D.J. Quavern wrote:If aliceOne is in the right position in the array
What's the right position of aliceOne in the array after sorting?
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
Stephan van Hulst wrote:
Because mergesort is a stable sorting algorithm it is guaranteed that after sorting the array, aliceOne must come before aliceTwo, and therefore changing the name of aliceOne will result in [Eve, Alice, Bob, Carol, Dave]. With quicksort you don't have this guarantee, so it's not used for arrays of objects.
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl