def increment_large_number(digits):

    n = len(digits)
    
    # Iterate through the digits from right to left
    for i in range(n - 1, -1, -1):
        # If the current digit is less than 9, increment it and return the array
        if digits[i] < 9:
            digits[i] += 1
            return digits

        else:
            digits[i] = 0

    # If all digits are 9, add a new digit 1 at the beginning of the array
    digits.insert(0, 1)
    return digits

# Example usage
digits = [1, 2, 3]
print(increment_large_number(digits))

digits = [4, 3, 2, 1]
print(increment_large_number(digits))

digits = [9]
print(increment_large_number(digits))