Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Straight backwards solution in Clear category for Common Tail by Tinus_Trotyl
def common_tail(a: list[int], b: list[int]) -> int | None:
common = []
for i in a: common = [i] + common if i in b else []
return common.pop() if common else None
Sept. 14, 2022