HackTheRounds Interview Experiences
Citadel HackerRank OA Interview Experience (2026) - Server Upgrade Binary Search & MEX Valid Sizes, Offer
Citadel SDE HackerRank OA walkthrough: Minimum Server Upgrade Window via binary search on answer and Memory Block MEX valid sizes after a single +1 operation. T
By Anonymous ยท 2026-03-25
Background
Took Citadel's HackerRank OA about two weeks ago as part of their 2026 quant-adjacent SDE cycle. I finished both problems inside of ten minutes, which either means the question pool has been relaxed or I got a friendly draw. From comparing notes with two other candidates in my Discord group, both of them also said "easier than expected," so I lean toward the pool being lighter this season. Either way, here is exactly what I got, how I read each problem, and what I'd hit harder if I had to retake.
Quick note: this is the HackerRank variant of Citadel's OA. Some teams use the CodeSignal variant with different question types (more tree DP, more partition problems). If you're prepping for the HackerRank flow specifically, the flavor below is what to expect.
Timeline
- Application: late February
- OA link: same day
- OA attempted: next evening
- Super Day invite: 8 days after OA
- Super Day: 2 weeks after the invite
- Offer: 5 business days after Super Day
- Total: about 6 weeks
OA Format
HackerRank, 75 minutes, 2 problems. Both scored on test cases with no partial credit explicitly shown in the UI (though I suspect the backend still does partial grading). You can submit as many times as you want before time runs out. The browser stays live-aware, so do not alt-tab to a search tab for anything you care about keeping private.
Problem 1: Minimum Server Upgrade Window
Problem: Two servers each need to be upgraded. Server 1 takes t1 seconds; server 2 takes t2 . Each second, at most one of them can be upgrading. Each server cannot upgrade on "request seconds": server 1 cannot upgrade on seconds that are multiples of req1 , and server 2 cannot upgrade on multiples of req2 . Find the minimum total elapsed time by which both servers finish upgrading.
The wording is noisier than the actual problem. Strip it down:
- I need to pick `t1` seconds for server 1 (excluding multiples of `req1`) and `t2` seconds for server 2 (excluding multiples of `req2`).
- The two sets of chosen seconds must be disjoint.
- Minimize the last second used across both.
This is binary search on the answer. Let x be the total elapsed time. Within the first x seconds:
- Available for server 1: seconds that are not multiples of `req1`. Count = `x - x // req1`.
- Available for server 2: seconds that are not multiples of `req2`. Count = `x - x // req2`.
- Seconds usable for *either*: `x - gcd_only_count`, specifically, seconds that are not a multiple of both (multiples of `lcm(req1, req2)` are unusable for either). Count = `x - x // lcm(req1, req2)`.
So feasibility is: pick t1 slots from the server-1-eligible set, pick t2 slots from the server-2-eligible set, the picks are disjoint.
By Hall's condition the feasibility check reduces to three inequalities comparing t1 against server-1-only slots plus shared slots, t2 against server-2-only plus shared, and the total demand against total available slots. The "only-1", "only-2", and "both" counts in the window of length x all decompose through x//req1 , x//req2 , and x//lcm(req1, req2) via inclusion-exclusion.
Binary search x between max(t1, t2) and a safe upper bound like 4 (t1 + t2 + max(req1, req2)) . Logarithmic in the upper bound. Fast.
Ran on the provided sample: t1=3, r1=2, t2=1, r2=3 returns 5. Matches.
Practice it: [[problem/188?company=33|Process Scheduling (No Consecutive)]]
Problem 2: Memory Block Valid Sizes via MEX
Problem: You have n memory blocks. memoryBlocks[i] is the size of block i . You can perform at most one operation: pick an index x and increment memoryBlocks[x] by 1, but only if the current value is strictly less than n - 1 . After the optional operation, the "valid size" of the configuration is the MEX (minimum excludant) of the array. Return all possible valid sizes you can achieve, sorted ascending.
I want the set of all achievable MEX values across the choice of "do nothing" or "increment exactly one eligible index."
Observation 1: if I do nothing, the MEX is some fixed value m0 . That is one achievable value.
Observation 2: incrementing index x changes the multiset. Specifically, it removes one copy of memoryBlocks[x] and adds one copy of memoryBlocks[x] + 1 . The resulting MEX depends on whether the removed value was unique in the array and whether adding the new value fills the MEX gap.
The clean way to compute this: use a frequency map. Compute the baseline MEX. Then for each possible value v in the array (group indices by value), simulate removing one copy of v and adding one copy of v + 1 , and recompute the MEX. Collect all results in a set.
Naive MEX recomputation is O(n), so total work is O(n distinct values) worst case, which at n = 10^5 is fine. Walk the set of distinct values, skip any value at or above n - 1 , temporarily mutate the frequency map, recompute MEX, then restore. Collect all MEX values into a set and return them sorted.
For n=3, blocks=[0, 3, 4] : baseline MEX is 1 (0 present, 1 missing). Incrementing the 0 to 1 gives multiset {1, 3, 4}, MEX = 0. Result set is {0, 1} which matches the expected [0, 1].
For tighter runtime, maintain a pointer to the current MEX and update it lazily under each single mutation, bringing the inner work to amortized O(1) per try.
Practice it: [[problem/186?company=33|Knight Dialer]]
Why I Think the OA Felt Easy
Two hypotheses:
- The pool rotates. The tree-DP flavored problems I saw other candidates post about last cycle (server-upgrade-in-a-tree, partition MEX over an array) are harder variants of the exact themes I got. Citadel may be draining easier pool items to fill in the season and saving the hard pool for mid-cycle.
- The bar is on Super Day, not the OA. Citadel famously has a tough Super Day. The OA might be tuned to filter only the bottom tier (syntax errors, wrong algorithm entirely) while the real evaluation happens live.
Either way, do not coast. My Super Day had one problem that felt like a hard HackerRank problem squeezed into 25 minutes, and I had to code it cold without partial-credit feedback.
Result
Got a Citadel Securities SDE new-grad offer about 5 business days after Super Day. NYC. The comp was higher than any FAANG offer in my cycle, which is typical for them.
Tips
- Binary-search-on-answer is Citadel's favorite pattern. If a problem asks "minimum time / minimum resource," try to phrase feasibility at a fixed answer first and binary search. Problem 1 here is a textbook instance; the scheduling-by-multiples twist is just flavor.
- MEX problems reward clean frequency-map code. Do not try to avoid the Counter. Just use it, compute MEX by linear scan from 0, and the problem usually collapses.
- Read HackerRank problem statements twice. Citadel's wording is dense because they want to see if you can strip out irrelevant flavor. The server problem spends three paragraphs on "request seconds" when the real constraint is just "certain seconds are unusable." Strip the noise first.
- Keep the browser tab focused. HackerRank has proctoring signals that track tab switches. If you need to check LeetCode or Stack Overflow, flip your phone instead and keep the main browser untouched.
- Budget 35 minutes per problem, not 37.5. The extra 5 minutes of buffer is for submission failures. I had a test case that timed out on the remote judge because my Python was 100ms too slow, and I had to switch to PyPy-style optimizations. That buffer saved me.
- For Super Day prep, do not just practice more LeetCode. Do Codeforces Div 2 problems B, C, D. That difficulty curve is closer to the Super Day coding bar than LeetCode medium is. Also brush up on expected-value math because at least one problem tends to have a probability twist.
Citadel's OA this season was easy. Super Day was not. Make sure you put the time budget where it matters.