简体   繁体   English

c ++项目取决于排序和搜索算法

[英]c++ projects depending on sorting and search algorithms

I've been trying to study datastrucutres and algorithms for many times and I feel everytime that I'm spending time on the theoretical part. 我一直在尝试多次研究数据表和算法,我觉得每次我都花时间在理论部分。
I wanted to know if there are some common famous projects to implement that mainly depend on sorting and search algorithms using C++ in order to practice more. 我想知道是否有一些常见的着名项目要实现,主要依赖于使用C ++进行排序和搜索算法以便实践更多。

Any RDBMS , ie PostgreSQL , MySQL etc. Any spell checker, though searching there is rather different and is based on string similarity algorithms (like Levenstein distance ). 任何RDBMS ,即PostgreSQLMySQL等。任何拼写检查,虽然搜索有相当不同,并基于字符串相似性算法(如Levenstein距离 )。 There are also open-source search engines . 还有开源搜索引擎 They do all sort of things - similarity, semantics analysis, data collection, search etcetera. 他们做各种事情 - 相似性,语义分析,数据收集,搜索等。 Some of the interesting C++ projects in this regard is Google's Spare Hash - a collection of amazing hash tables. 在这方面,一些有趣的C ++项目是Google的Spare Hash - 一系列令人惊叹的哈希表。 In other words - sorting and searching is everywhere. 换句话说 - 排序和搜索无处不在。

One interview question i was given was about a data structure of names, such as a phone book. 我给出的一个访问问题是关于名称的数据结构,例如电话簿。

Which would be the best data structure, and which sorting & searching methods would be best if: 哪个是最好的数据结构,哪种排序和搜索方法最好:

  • You commonly search for one name at a time...or, 您通常一次只搜索一个名称......或者,
  • You commonly print out all the names in a row...or, 您通常会连续打印出所有名称...或者,
  • You commonly search for names when you don't know the full name, such as only first, or only last 您通常在不知道全名时搜索名称,例如只有第一个或最后一个
  • etc. 等等

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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