【发布时间】:2018-05-24 02:34:38
【问题描述】:
我想查找具有特定短字符串数组或链表的字符串。我使用 c++ 制作了一个搜索会议或研讨会的小程序,例如http://dblp.uni-trier.de/。我想知道的是如何在数组或链表中快速搜索字符串。使用 string.find() 函数时,如果数组的长度为 n,我认为该函数的性能具有 O(n) 时间复杂度。我可以将性能提高到低于 O(n) 吗?请帮帮我
【问题讨论】:
标签: c++ string data-structures