Max the Lottery ID
Reported by candidates from Citadel's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Citadel's "Max the Lottery ID" problem landed in February 2024 and it's a curveball. You get a problem title that sounds like a game but doesn't tell you what you're actually optimizing. The real trick: the problem is hiding the pattern until you read the full spec. Candidates who assume it's a greedy max-finding problem blank on the constraints. StealthCoder reads the full problem and pipes the pattern to you in real time, so you skip the guessing phase and go straight to the solution.
Pattern and pitfall
Without the verbatim problem text, the pattern isn't fully clear, but "Max the Lottery ID" likely involves either finding the maximum ID under some constraint or generating IDs that satisfy a lottery-like rule. Common Citadel tricks: the constraint is hidden in a clause, the ID is a composite of digits or bits, or the solution requires pruning a large search space. The pitfall is solving the obvious version (just find the max) when the real problem asks for a conditional max, a lexicographically largest ID, or an ID that meets a modular arithmetic rule. StealthCoder acts as a backline if you misread the spec during the live OA and need the exact constraint re-stated in plain language while you're coding.
Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.
You can drill Max the Lottery ID cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Citadel's OA.
Citadel reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Max the Lottery ID FAQ
What if the problem is actually about digit or bit manipulation?+
Citadel loves problems where the ID is a number you construct or filter. Read for constraints on which digits/bits are allowed, whether order matters, and what "max" means. If it's about digit swaps or bit flips to maximize, it's a greedy or dynamic-programming problem, not a search problem.
How do I prepare for a Citadel OA with a vague title in 24 hours?+
Don't prep the title. Prep the pattern. Citadel uses math, bit tricks, and search space pruning. Review binary search, greedy with proof of optimality, and modular arithmetic. Have a template for "find max subject to constraint X" that covers both brute-force and optimized branches.
Is this a well-known LeetCode problem or something Citadel made?+
It's not a standard LeetCode title, so Citadel likely custom-built it. That means the pattern is lean and the gotcha is in the spec. Read every word of the problem statement twice before coding. Don't skip the examples.
What if I blank on the approach during the OA?+
Start with brute-force. Generate all valid IDs, track the max. That passes if constraints are small (ID length under 10, range under 10^6). Then optimize if needed. Citadel values a working solution over an elegant blank. Move fast and code confidently.
Does "lottery" imply randomness or just a funny name?+
It's just flavor. Ignore the narrative. Focus on the problem: what is an ID, what counts as valid, what does max mean. The lottery theme doesn't add algorithmic weight. It's a red herring.