citadel securities logo
Citadel Securities· C++ Engineer

Citadel Securities OA (C++ Engineer)

Result
Ongoing
Posted
12 Oct 2025
583 reads

Summary

I participated in the Citadel Securities Online Assessment for a C++ Engineer role. The task involved refactoring complex C++ code to improve its time complexity, specifically solving a problem to find the maximum difference between elements x[i] - x[j] where j <= i within a 1.5-hour time limit.

How it went

I recently took the Online Assessment for a C++ Engineer position at Citadel Securities. The assessment was a challenging 1.5-hour task focused on refactoring existing, complex C++ code. A significant part of the challenge involved identifying misleading variable names and deceptive logic. For instance, some variables were named to suggest graph structures when none existed, and tricks like casting and bit shifting were used instead of simple x >= 0 checks, or squaring and then taking a square root instead of a direct a >= b comparison. The core algorithmic problem I needed to optimize was finding the max(x[i] - x[j]) where j <= i. I was required to reduce the initial O(n2) complexity to an O(n) solution.

Questions asked (1)

  1. 01

    Max Difference x[i] - x[j] with j <= i

    Data Structures & Algorithms · Medium

    The primary algorithmic challenge was to implement a function that finds the maximum value of x[i] - x[j] from a given array x, with the constraint that the index j must be less than or equal to i (j <= i). The initial implementation presented was O(n2) and needed to be optimized to achieve O(n) time complexity.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Citadel Securities recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!