stableなquicksortないかなと思っていろいろ探していたらPerlのquicksortがstableな実装だった. perl5.10.0のpp_sort.cより引用. Perlのquicksortについては以下のようなデータ構造を利用している. indir list1 +----+ +----+ | | --------------> | | ------> first element to be sorted +----+ +----+ | | --------------> | | ------> second element to be sorted +----+ +----+ | | --------------> | | ------> third element to be sorted +----+ +----+ ... +----+ +----+ | | ----