libuda
def isOneBitCharacter(bits):
"""
:type bits: List[int]
:rtype: bool
"""
while len(bits)>2:
if bits[0]==1:
bits=bits[2:]
else:
bits=bits[1:]
if bits==[1,0]:
return False
elif bits==[0,0] or bits==[0]:
return True


res=isOneBitCharacter([1,1,1,1,1,0,0,0,0,1,1,1,1,0])
print(res)

相关文章:

  • 2021-09-23
  • 2022-12-23
  • 2021-10-03
  • 2021-12-09
  • 2022-12-23
  • 2021-10-03
  • 2021-10-03
猜你喜欢
  • 2021-09-13
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-02-10
  • 2021-10-09
相关资源
相似解决方案