Siblings, cousins or neither: two nodes in a tree
Given a tree and two of its nodes, say whether they are siblings (same parent), cousins (same depth, different parents) or neither.
No answer yet. Write the first one; the best answer gets endorsed.
Given a tree and two of its nodes, say whether they are siblings (same parent), cousins (same depth, different parents) or neither.