def lex_less_Nd(a, b):
    """Determine if array 'a' lexicographically less than 'b'."""
    for _a, _b in zip(a, b):
        if _a < _b:
            return True
        elif _a > _b:
            return False
    return False