To be honest,Citadel OA is completely different from ordinary big manufacturers.
It doesn’t test whether you can do the questions. What it tests is: can you stay calm, write industrial-grade code, and make 0 consecutive mistakes for 90 minutes? This time I passed both questions in one go, and the whole process was very "Citadel style": no detours, no mercy, just a pure showdown of hard power. Below, I will show you the real questions, my thoughts, and pitfalls that can easily lead to overturning.
Citadel OA Process
- quantity: 2 questions
- Duration:90 minutes
- Difficulty: Above average, but implementation requirements are extremely strict
- Key capabilities:
- Code accuracy
- Boundary processing
- Basic skills of algorithm (prefix sum/DP/bit operation)
- mental stability
It is not difficult to write it, but "write it correctly and AC" - this is what Citadel wants to screen out 90% of people.
Citadel OA English real questions
Problem 1 — Count Stable Server Segments
Description
Given an integer array capacity[] representing server capacities, count all “stable” segments [l, r] (with r≥l+2) such that:
capacity[l] == capacity[r], andcapacity[l] == sum(capacity[l+1 … r−1])
Return the number of stable segments.
T1|Stable Server Segments: prefix sum + strong observation ability
If you don't see "you need to use the prefix sum" in this question, you will die immediately.
The entire question tests:
Can you calculate the interval sum → in constant time and then traverse all legal intervals stably?
My approach:
- Type the prefix and prefix first
- Double layer loop, look at all l, then look at all r ≥ l+2
- Be very careful with conditional judgments:
capacity[l] == capacity[r]capacity[l] == prefix[r-1] - prefix[l]
O(n²) is enough for this question. Citadel's data range allows you to use violence. As long as you write it cleanly, you can get AC.
What really distinguishes people is whether you can write it correctly every time without leaking the boundaries.
Problem 2 — Goodness Values of Increasing Subsequences
Description
Given an array Nums, consider all strictly increasing subsequences.
The goodness value of a subsequence is defined as the bitwise OR of all its elements.
Return all distinct goodness values, sorted in ascending order.
T2|Goodness Values: Set DP + bit operation
This question has a little flavor.
It's not brute force subsequence, but:
Try to extend all existing goodness states into new ones.
The code structure is similar to DP, but the form is more like "status collection rolling update".
Idea:
- A set stores all current goodness values, initially
{0} - Iterate over each x in nums
- Try for each value in the set
val|xGenerate new status - Note that the subsequence must be strictly increasing (the question ensures that you deal with the last value)
- Temporary collection 🔁 Main collection
- final sort output
This question is very Citadel:
It’s not difficult, but you have to write cleanly, without repetition, without crossing boundaries, and without logical errors.
Why is this OA so lethal?
Citadel’s questions are not meant to “stump you”;
It's the kind that's "simple enough, but you'll send it if you're careless".
The test is "calm + stability".
All you need to do is lose your temper, write sum incorrectly, write OR incorrectly, or update set incorrectly...
If you are stuck on one point, you will get 0 points for the entire question.
This is why so many big manufacturers still sell their products at Citadel.
How did I make 0 mistakes this time?
I will take you all the way this time programhelp Traceless assists:
Not ghostwriting, but that kind of——
"Did you miss the equal sign in this range?"
"Don't rush at this step, check the border again."
"You can break in advance here to improve stability."
Just like there is a senior quant/engineer standing behind you,
Help you apply the brakes at key points to prevent you from making mistakes under UI pressure.
Citadel OA is definitely not something that can be solved by just studying the number of questions.
Mentality and stability are far greater than the idea itself.