Complexity in multiple if-else algorithms
Building on @alzaimar's answer:

You can unfold the conditionals with early return. The linear flow makes it slightly easier to follow.

if (listContainingLeft == null &amp;&amp; listContainingRight == null)
{
    AddBranch(left, right);
    return;
}

if (listContainingLeft != null &amp;&amp; listContainingRight != null)
{
    Combine(listContainingLeft, listContainingRight);
    return;
}

if (listContainingLeft != null)
{
    listContainingLeft.Add(right);
    return;
}

if (listContainingRight != null)
{
    listContainingRight.Add(left);
    return;
}