Questions tagged [ternary-tree]

Ternary tree is a tree data structure in which each node has at most three child nodes, usually distinguished as "left", “mid” and "right".

Nodes with children are parent nodes, and child nodes may contain references to their parents. Outside the tree, there is often a reference to the "root" node (the ancestor of all nodes), if it exists. Any node in the data structure can be reached by starting at root node and repeatedly following references to either the left, mid or right child. Ternary trees are used to implement Ternary search trees and Ternary heaps.

35 questions
0
votes
0 answers

When Checking if( ! node->next ), node->next =0x4 should be NULL

So I am writing a ternary tree and I get seg faults after maybe 20 insertions. When I isolate the problem in GDB I get a very odd error I have never seen before. on the statement of code below, greater is another NODE and that node SHOULD be NULL…
Elblonko
  • 25
  • 4
0
votes
1 answer

Searching for (NOT with) wildcards inside an ternary search tree

I want to modify an recursive function from an 'ternary search tree' library (sourceforge & http://code.google.com/p/ternary-search-tree/). The default behaviour is to search in an ternary search tree for all occurences of strings that match an…
Constantin
  • 8,721
  • 13
  • 75
  • 126
-1
votes
1 answer

Creating an object in Python from multiple classes

I am creating a spellchecker where I will accept an input word and then produce a list of words with an edit distance of 1 while checking if these words can be found in the ternary tree I will create. This tree will be made using a list of valid…
-2
votes
1 answer

Segmentation fault (core dumped) but can't figure out

From my understanding a segfault is usually caused by invalid memory access or leak? But I can't figure out where it is. Is there a way like a program that will go through your code and figure out where it is causing this error? Please help. I am…
Lilith X
  • 99
  • 1
  • 9
-4
votes
2 answers

dictionary/tree fast key based lookup

I have a database of 20000 domain names, including Top Level Domains, Second-level and lower level domains. For example .biz stackoverflow.com ru.wikipedia.com I would like to perform fast lookups to see if input URLs match any of these 20000. I…
jjarv
  • 71
  • 6
1 2
3