Pythonic short Python

  • 0

    Just go through the bits. For every 1-bit, skip the following bit. Return whether the last seen start bit was zero.

    def isOneBitCharacter(self, bits):
        bits = iter(bits)
        for bit in bits:
            if bit:
        return not bit

    Tiny and no numbers or operator symbols :-)

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.