Skip to main content

All Questions

Tagged with
6votes
5answers
11kviews

DFS in Binary Tree

I have written this code for DFS in a binary tree and would like improvements on it. ...
Mehrdad's user avatar
2votes
0answers
373views

Follow-up 1: Compare 2 unordered, rooted trees for shape-isomorphism

The previous post can be found here. In the previous post I tried to solve an exercise but found through the answer of Peilonrayz a bug in the code and 2 more while fixing it. These have now been ...
Philipp Doerner's user avatar
2votes
2answers
1kviews

Compare 2 unordered, rooted trees for shape-isomorphism

I'm currently working through "Algorithms in java" by Robert Sedgewick (3rd edition, german version) on my own and am trying to solve one of the exercises there. Edit: This question now also has a ...
Philipp Doerner's user avatar
1vote
3answers
2kviews

Lowest common ancestor in recursive tree traversal

LCA = Lowest Common Ancestor The following code finds the lowest common ancestor in tree of nodes, where a node can have two parents, left and right. The tree looks like this: ...
NimChimpsky's user avatar

close