寻找一个.NET二叉树 [英] Looking for a .NET binary tree

查看:104
本文介绍了寻找一个.NET二叉树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个行之有效的简单的内存二叉树实现C#。我想AP preciate任何指针...

I'm looking for a well tested simple in-memory binary tree implementation for c#. I would appreciate any pointers...

推荐答案

在.NET框架已经包含了他们,他们只是不公布这样。可能是因为在三种不同的方式来遍历树固有的模糊性。 SortedDictionary使用自平衡红黑树罩下,并且具有相同的时间和空间复杂度的二进制树。你需要排序列表,如果你的树包含重复。

The .NET framework already contains them, they are just not advertised as such. Probably because of the inherent ambiguity in the three different ways to iterate a tree. SortedDictionary uses a self-balancing red-black tree under the hood and has the same time and space complexity as a binary tree. You'll need SortedList if your tree contains duplicates.

这篇关于寻找一个.NET二叉树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆