Re: Inorder Traversal of B-Tree



On Jan 28, 11:37 pm, Logan Shaw <lshaw-use...@xxxxxxxxxxxxx> wrote:

(snip)

So a correct in-order traversal of a B-tree will return the keys in
order, and an implementation of a correct in-order traversal will
be built upon the properties of a B-tree that allow it to keep the
keys in order.

Thank you for that information. So I can verify whether my in-order
traversal of a B-Tree is correct by looking at the order in which the
keys are being visited. This basically will involve visiting a node N
times where N is the number of keys in the node.

But what about pre-order and post-order traversal? Will this also
apply to them? Will I visit the node N times in them too? Or will I
visit the node only once (and so visit all keys in that node one after
another). For example, at http://en.wikipedia.org/wiki/Tree_traversal,
the first two lines say that each node is visited exactly once. That
is not very correct, right?

(begin-quote)

In computer science, tree-traversal refers to the process of visiting
each node in a tree data structure, exactly once, in a systematic way.

(end-quote)

Thank you.

Rgds,
anna


- Logan

.



Relevant Pages

  • Re: Inorder Traversal of B-Tree
    ... result in the keys being listed in ascending order? ... find out the correct way to do an inorder traversal of a B-Tree. ... I am looking for multiway tree traversal, ... While traversing a B-Tree, ...
    (comp.programming)
  • Re: Data structure for indexing on multiple keys.
    ... > I have fair knowledge of B-tree and hash indexing mechanisms. ... > What data structure/algorithms should I read upon if I want to ... > Please note that this is not about composite keys but supporting ... database for other operations? ...
    (comp.programming)
  • Re: Data structure for indexing on multiple keys.
    ... > I have fair knowledge of B-tree and hash indexing mechanisms. ... > What data structure/algorithms should I read upon if I want to ... > Please note that this is not about composite keys but supporting ... database for other operations? ...
    (comp.theory)
  • Inorder Traversal of B-Tree
    ... Can anybody tell me whether an in-order traversal of a B-Tree will ... result in the keys being listed in ascending order? ...
    (comp.programming)
  • Re: Great SWT Program
    ... "control-Z to undo" is as natural as breathing. ... obtuse and difficult to learn when the arrow keys are ... characters and then type in the resulting number before hitting my ...
    (comp.lang.java.programmer)