问题描述
有人可以教我如何使用 F# 根据给定数据制作一棵树吗?例如:数字列表或城市名称列表等.我不知道如何在 F# 中制作树,需要帮助:)
can somebody teach me how to make a tree from a given data using F#? for example: a list of numbers or a list of city's name and etc . I don't have any clue how to make tree in F#, need help here :)
例如:输入来自运行时,假设它来自文本文件:城市的列表名称
for example:the input is from run-time, assume it's from a text file: a list name of city
输出结果:图形
推荐答案
维基百科有一个 list 表示图形数据的常见方式,如果您尝试从文件加载图形数据,它们应该会对您有所帮助.加载数据后,search 堆栈溢出.其中有很多关于树实现的问题.这里有一些.
Wikipedia has a list of common ways graph data is represented which should help you if you're trying to load graph data from a file. Once you have loaded the data search Stack Overflow. There are plenty of questions with tree implementations in them. Here are a few.
这篇关于如何使用 F# 从给定数据制作一棵树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!