Implement the function max_unique_promo_errors in a file called /app/solution.py that calculates the maximum number of errors (k) such that any promo code can be uniquely identified if it is typed with at most k mistakes.
Functionality
The function should accept a list of promotional codes, where each promotional code is a string consisting of exactly 6 digits.
The function should return an integer representing the maximum allowable number of digit errors (k) for uniquely identifying each promo code.
Input/Output Requirements
Input:
promo_codes: A list of strings, each containing exactly 6 digits. The list can have one or more promotional codes.
Output:
An integer: Maximum k value indicating the number of mistakes that can be tolerated while still ensuring that each promo code is uniquely identifiable.
Constraints
The function should handle cases with only one promo code by returning 6, as any single code can be typed incorrectly up to 6 times without ambiguity.
The function must handle cases with multiple promo codes and determine the minimum number of differing digits between any two codes to compute k correctly.