Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Painting Wall by tokiojapan55
def checkio(required, operations):
wall = list()
for n,ope in enumerate(operations):
if not wall or ope[0]>wall[-1][1]+1:
wall.append(tuple(ope))
elif ope[1]=required:
return n+1
return -1
June 16, 2020
Comments: