0
$\begingroup$

Are there special names for the following?

  • two variants of depth first search: 1. the current node is visited before its children; 2. the current node is visited after its children;
  • two variants of breadth first search: 1. the current node is visited before its children; 2. the current node is visited after its children.

I wonder why Wikipedia is silent on this subject.

$\endgroup$
  • $\begingroup$ Why do you think we would need there variants? What do you think they add to BFS or DFS? $\endgroup$ – DreamConspiracy Jan 17 '18 at 6:50
  • $\begingroup$ @DreamConspiracy I am going to run a digraph of interrelated "modules". A module may link to other module and I do module traversal either depth-first or breadth-first. I may want to "execute" the modules a module refer to either before of after the current module, as specified by the syntax of the reference. $\endgroup$ – porton Jan 17 '18 at 6:53
  • $\begingroup$ Wikipedia is not. en.wikipedia.org/wiki/Tree_traversal $\endgroup$ – dEmigOd Jan 17 '18 at 6:55
  • 1
    $\begingroup$ Why stop there? You could visit the current node between its left and right children, or you could visit the current node both before and after the children. $\endgroup$ – user14972 Jan 17 '18 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.