Palantir Foundry pipelines may process an ordered stream of event types from an operational workflow. Given the event types in arrival order, find the length of the longest contiguous subsequence containing no repeated event type.
Implement longest_unique_event_window(events).
events, a list of strings representing event types in chronological order.def longest_unique_event_window(events):