Re: Depth First Search in Binary Search Tree?
- From: "Howard" <alicebt@xxxxxxxxxxx>
- Date: Thu, 26 Oct 2006 15:05:07 GMT
"howa" <howachen@xxxxxxxxx> wrote in message
news:1161870190.987285.201730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Is that DFS on BST = pre-order?
thanks.
Pre-order refers to the traversal method. Depth-first refers to the search
method. Two different things, really.
But in a depth-first search, it would be highly inefficient if you waited
until after searching either of the child branches before testing if the
current node were actually the one you wanted, right? So, if you test the
node _before_ traversing the child branches, then.........
-Howard
.
- Follow-Ups:
- References:
- Depth First Search in Binary Search Tree?
- From: howa
- Depth First Search in Binary Search Tree?
- Prev by Date: code example for click-and-drag-to-highlight table cells
- Next by Date: An alternative to Bloom filters
- Previous by thread: Depth First Search in Binary Search Tree?
- Next by thread: Re: Depth First Search in Binary Search Tree?
- Index(es):