(addrs: List[int])
return lst
Take a list of integers and return a new list of integers where front and back integers interleave.
Take a list of integers and return a new list of integers where front and back integers interleave.
Take a list of integers and return a new list of integers where front and back integers interleave .
def _interleave_ints(addrs: List[int]) -> List[int]:
        """
        Take a list of integers and return a new list of integers where front and back integers interleave.
        """
        lst = [None] * len(addrs)
        front, back = 0, len(addrs) - 1
        i = 0
        while front <= back:
            lst[i] = addrs[front]
            i += 1
            front += 1
            if front < back:
                lst[i] = addrs[back]
                i += 1
                back -= 1
        return lst
def _interleave_ints ( addrs : List [ int ] ) -> List [ int ] : lst = [ None ] * len ( addrs ) front , back = 0 , len ( addrs ) - 1 i = 0 while front <= back : lst [ i ] = addrs [ front ] i += 1 front += 1 if front < back : lst [ i ] = addrs [ back ] i += 1 back -= 1 return lst