Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Straightforward solution in Clear category for Common Tail by suic
def common_tail(a: list[int], b: list[int]) -> int | None:
res = None
for x, y in zip(reversed(a), reversed(b)):
if x != y:
return res
res = x
return res
Sept. 18, 2022