Intersection of Two Chains
Two paths that merge share a tail. Find the first shared node with a set, or with two pointers that swap starts.
Two paths that merge share a tail. Find the first shared node with a set, or with two pointers that swap starts.
One question - where do the paths to two nodes split - answered with steadily less information about the tree.
Two lines of arithmetic - peel the last digit off, append a digit on - and a choice of base. Every problem here is those two lines wearing different clothes.