[英]Algorithm for building tree hierarchy based on URL paths
This is related to Parse Url Strings into Tree Hierarchy 这与将URL字符串解析为树层次结构有关
But i'm implementing in javascript, therefore require some algorithm here instead of using SQL functions. 但是我正在用javascript实现,因此这里需要一些算法而不是使用SQL函数。
Prefix tree/Trie or Suffix Tree 前缀树/ Trie或后缀树
It is really difficult to suggest one over the other unless you specify the sort of operations you intend to perform over and above organising them. 除非您指定打算在组织这些操作之外执行的操作的类型,否则很难提出一个建议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.