我一直认为空间复杂度是 O(1) 但我在网上查看它在不同阶段使用不同的排序算法这让我很困惑, std::sort 的空间复杂度到底是多少以及它们什么时候不同?
c++ sorting std
c++ ×1
sorting ×1
std ×1