.net中有排序和搜索功能吗
我正在对集合中的搜索实现线性搜索,然后我想为什么不使用二分搜索,为此我必须使用排序。 虽然我可以实现它们,但我想知道它们存在于.net本身的哪里。我希望它会出现在.Net 中。
I was implementing linear search for search in a collection then i thought why not use binary search, for which i had to use sorting.
Although I can implement them, but I would like to know where does they exists in .net itself. I hope it would be present in .Net.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果我没有理解错的话,这就是您正在寻找的“
搜索
排序”
If I didn't get it wrong this is something you are looking for
For Searching
For Sorting
来自这个所以答案:
From this SO answer:
.NET 默认实现排序,但是虽然您可以指定元素的排序顺序,但无法指定排序的算法。
因此,您可能对这篇文章感兴趣,它提供了 .NET 代码抽象排序包括每个主要排序方法的实现。
.NET has sorting implemented by default, but while you can specify the order in which you would like your elements sorted, you cannot specify the algorithm with which it sorts.
As such, you might be interested in this article which provides .NET code for abstractly sorting including implementations of every major sorting method.