Junior — Middle+
Determining the length of the largest subarray without duplicate elements
livecode
Task condition
Implement a function that takes an array and computes the maximum length of a contiguous subarray in which all elements are unique. Example function signature:
def longest_unique_subarray(arr: List[int]) -> int:
# your code here
The function should return a single number — the length of the longest segment of the array with no repeating values.