Citadel

Interview Question

Software Engineer Interview
Citadel

Given an array representing user events, find the length of the longest contiguous subarray where the most frequent user in that subarray has the same number of events as the least frequent user in the entire event log. Write an efficient function to solve this problem.

Unlock the Full Solution

Enter your email to get instant access to the complete solution, explanation, and similar practice problems.

Insights on 100+ quant firms, understand where to apply, and maximize your chances.

Get the official 2025 QB Quant Firm Tier List

Check your email inbox — you should get the interview in 1-2 minutes!