c# - C# 中的 Tree<String> 数据结构

标签 c# tree

早上好

C#有没有好的、高效的、性能好的n叉树数据结构实现?我不需要关于节点类型的任何灵 active ,因为我只需要存储字符串。但是,我想要快速查找时间。此外,我需要用(短)整数标记树的“边”,但这些标签可以很好地存储在每个节点上。

非常感谢。

最佳答案

你试过吗?

public class CustomTreeNode
{
    public String Label { get; set; }
    public List<CustomTreeNode> Children { get; set; }
}

此外,您可以随时尝试 TreeNode类。

关于c# - C# 中的 Tree<String> 数据结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4076782/

相关文章:

c# - 从树中删除重复项

c# - 从数组偏移量中获取连续的 n 个值

c# - 使用 HTTPS "The authentication or decryption has failed"的 WebClient.DownloadString

java - Java中的树实现(根, parent 和 child )

android - Android Studio v0.2.x 中如何查看项目树?

git - 在 Windows 上以树形格式递归列出 git 存储库中的所有文件

c# - 使用 ExpressionVisitor 停止遍历

c# - 如何在 C# 中表示一个数字是长整数还是小数?

c# - 使用 C# 访问 GIF 帧

algorithm - 二叉搜索树中的顺序后继