Lowest Common Ancestor

因为题目假定了连个node存在,如果不一定存在,则必须traverse来确定结果,in the worst case, time complexity is O(n).

results matching ""

    No results matching ""