Skip to main content

Questions tagged [trees]

A tree is a hierarchical data structure in which every node is accessed via a unique path that starts at a unique root node. Trees are often used for searching data and optimizing an ordered access to nodes. In the graph theory, a tree is a graph of connect nodes without cycles. Attention: use tag 'trie' for the tree like data structure aiming at string matching (prefix/suffix)

6 votes
6 answers
870 views

I have a set of data carrier objects represented using vertices in a strict tree hierarchy. I also have the following requirements: some vertices should be "linked" to other vertices ...
Andorrax's user avatar
1 vote
1 answer
115 views

I'm looking for a method to map the content of a structured text file to a nested dictionary (dictionary tree). The text file consists of (nested) sections with each section starting with the pattern ...
user71769's user avatar
  • 121
2 votes
3 answers
267 views

Purely relational databases (SQL) seem to suffer to nowadays from the lack of a good solution for search/indexing hierarchies. Here a systematic review of the subject: https://stackoverflow.com/q/...
Peter Krauss's user avatar
0 votes
1 answer
370 views

My problem is as follows: I'd like to represent a directory/files-type structure in memory as efficiently as possible. By efficient, I mean: Quick retrieval of siblings and children from paths like &...
user18490's user avatar
  • 111
1 vote
1 answer
162 views

In his "Software Engineering. Principles and Practice," H. van Vliet mentions "tree impurity of a call graph." However, the term tree impurity is not used in this meaning anywhere ...
DYZ's user avatar
  • 339
0 votes
0 answers
70 views

I created an abstract class to represent a vertex in a tree structure. Later, a requirement was introduced where certain types of vertices are not allowed as descendants of certain other vertices. So ...
Cave Johnson's user avatar
0 votes
4 answers
315 views

Assume I have a set of nodes of an n-ary tree, packed in a dense array in depth-first order. This tree (I'm showing links between each parent and its list of children): [A] | [B]--[E]--[F] | ...
fearless_fool's user avatar
0 votes
1 answer
224 views

I am developing an API responsible for returning the distinct searches made on a service given a date prefix. Example data: 2015-08-01 00:00:18 %22http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%...
alves's user avatar
  • 101
0 votes
0 answers
204 views

For a given, tree-like data structure: - Alan - Barbara - Charlie - Cecil - Brian - Chris - Candice - Cohen - Boromir - Corcoran -...
StuperUser's user avatar
  • 6,163
-1 votes
1 answer
416 views

Edit #1 I believe that I misrepresented my intent when writing this question by focusing too much on the issues that have arisen from our misuse/misunderstanding of locks. I am making this edit to try ...
notphilphil's user avatar
4 votes
1 answer
2k views

I was reading this article, which talks about storing location-based information. The author says that while Latitude and Longitude info for the locations can be stored in a SQL database, retrieving ...
Ufder's user avatar
  • 254
2 votes
2 answers
303 views

I am in the process of designing a database organizing real world items in different storage locations. One main principle is that items can contain other items. So the relevant table is: An "...
gaugau's user avatar
  • 321
0 votes
0 answers
80 views

I want to implement a 2-3 tree in C# language, where every leaf has a unique key. The keys are from a given class that implements the IComparable interface (the specific class is unknown, and it's ...
Daniel's user avatar
  • 155
7 votes
2 answers
645 views

What is difference between Average length of codes and Average length of codewords in Huffman Algorithm? is both the same meaning? I get stuck in some facts: I see a fact that marked as False: for a ...
Emma Nic.'s user avatar
  • 183
0 votes
2 answers
791 views

I would like to have a relatively small and simple tree in C++. Each node would contain an integer. The tree should be traversable both ways. I know it can be done with tree.hh by Kasper Peeters, but ...
Igor's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
12