*shrug*But why I not directly use heap sort or tree sort if I can use them?
Why not use a general purpose "Quicksort"? Why bother studying "Patience Sort"?
What algorithm you need to use should be determined by how much you know about the data to be sorted and the characteristics you require.
I have never studied "Patience Sort". It may be that, as a sorting algorithm, it is useless when compared to any other sorting algorithm. If so, "Patience Sort" would not be the only sorting algorithm useless for sorting. Many "useless" sorting algorithms are of particular use because of the characteristics of how they sort the data.
Without an extensive study of the performance of the algorithm I have no way of knowing if its characteristics are suitable to sorting a particular "kind" of data.
I did not say that you had to use a tree or heap.I just think patience sort has its own way to do that.
I also never said that this algorithm was worth implementing.
Soma