Longest Switching Slice

Company: citi_14oct

Difficulty: medium