简体   繁体   中英

Sorting vector of pointers complexity

For education purpose. What is the complexity of sorting array/vector?

Typical sort has n log n, is sorting pointers faster?

Sorting will always be the same complexity... You mean sorting an array filled with pointers to things you want to sort?

Sometimes it might be faster (faster execution, not complexity). This is because changing places of pointers may be faster than changing places of some complex objects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM