Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Common Tail by Moff
def common_tail(a: list[int], b: list[int]) -> int | None:
result = None
for x, y in zip(a[::-1], b[::-1]):
if x == y:
result = x
else:
break
return result
Sept. 27, 2022
Comments: