Fastest way to search and sort vectors

前端 未结 6 1485
甜味超标
甜味超标 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-02 18:46

    If you need the fastest or the best sorting algorithm... There is no such one. At least it haven't been found yet. There are algorithms that provide better results for different data, there are algorithms that provide good results for most of data. You either need to analyze your data and find the best one for your case or use generic algo like std::sort and expect it to provide good results but not the best.

提交回复
热议问题