As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。
9年前关闭。
我对C++数据结构了解不多,但是我想知道您(程序员)使用STL还是编写自己的代码?毕竟,STL旨在执行诸如搜索,替换以及通过数据列表进行更多操作之类的任务。
因为我可以使用STL,所以确实不需要真正了解链接列表,二进制搜索等等。你有什么建议?
9年前关闭。
我对C++数据结构了解不多,但是我想知道您(程序员)使用STL还是编写自己的代码?毕竟,STL旨在执行诸如搜索,替换以及通过数据列表进行更多操作之类的任务。
因为我可以使用STL,所以确实不需要真正了解链接列表,二进制搜索等等。你有什么建议?
最佳答案
您应该使用STL,因为它已经过测试和优化。
这并不意味着您不应该自己知道如何编写这些数据结构。有了这种能力,您将能够为您的应用选择最佳的STL数据结构。