Citadel

Interview Question

Software Engineer Interview
Citadel

Given a matrix and the coordinates of the top-left and bottom-right corners, calculate the sum of the elements within the specified submatrix in (1) linear time and (2) constant time. You are allowed to preprocess the matrix.

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!