Fastest way to search and sort vectors

前端 未结 6 1488
甜味超标
甜味超标 2021-01-02 18:16

I\'m doing a project in which i need to insert data into vectors sort it and search it ...

i need fastest possible algorithms for sort and search ... i\'ve been sea

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 18:30

    if your elements are of integer you should use bucket sort algorithm which run at O(N) time instead of O(nlogn) average case as with qsort [http://en.wikipedia.org/wiki/Bucket_sort]

提交回复
热议问题