如何使用O(log n)C#搜索记录 [英] how to search record use O(log n) C#
本文介绍了如何使用O(log n)C#搜索记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个文本文件.该文件包含两个字段城市和销售数字.搜索操作暂存器的工作效率为0(log n).
I have a text file. This file contains two fields city and sale figure. the search operation shold work with an efficiency of 0 (log n).
推荐答案
考虑了一下,开始 ^ ].
Having thought about it, start here[^].
您必须提供更多详细信息,才能很好地解决您的问题.
从您的帖子中我了解到您正在使用文本文件作为数据库
文本文件不能替换数据库(从性能角度来看),在oredr中,要解决此问题,您可以将所有数据加载到Dictionary中并查询字典中的数据
Hi
you must supply more detail in order to get a good solution to your problem.
from your post i understand that you ar using a text file as database
text file cant replace a DB (from a preformancepoint of view), in oredr to solve this problem you can load all the data into Dictionary and query the dictionary for the data
这篇关于如何使用O(log n)C#搜索记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文