Reported July 2024
Citadelhash table

Find Consistent Logs

Reported by candidates from Citadel's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Citadel OA. Under 2s to a working solution.
Founder's read

You've got a Citadel OA incoming and "Find Consistent Logs" is on the table. This is a data validation problem disguised as a search task. You're looking for logs that satisfy some consistency rule across a dataset, and the catch is usually in how you define and check consistency across multiple entries or fields. StealthCoder will catch the edge case you miss under pressure, but the real win is recognizing this is a filtering and grouping problem, not a complex algorithm.

Pattern and pitfall

The core pattern here is hash-table grouping combined with a consistency check. You'll read through logs, bucket them by some key (likely a user ID, timestamp, or session identifier), then verify that entries within each bucket meet a constraint. The constraint might be that all logs for the same user have the same value in a field, or that no two logs conflict on a property. Common pitfall: assuming consistency is global when it's actually per-group. Another trap: off-by-one in comparison or missing a tie-breaking rule. Build a map, iterate once to group, iterate again to validate. If you blank on the rule during the live OA, StealthCoder reads the problem statement and hands you the logic in seconds.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Find Consistent Logs 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. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Citadel's OA.

Citadel reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Find Consistent Logs FAQ

What does 'consistent' mean in this context?+

Usually it means: given a grouping key (user, session, IP), all entries in that group must have the same value for another field, or no two entries can contradict on a property. Read the problem carefully. 'Consistent' is not a generic term here; it's problem-specific. The definition is your starting point.

Should I sort the logs first?+

Not necessarily. Sorting helps if you need to detect anomalies by order, but grouping by hash is faster. Only sort if the problem asks for output in a specific order, or if you're detecting *consecutive* inconsistencies. Check the expected output format first.

How do I know if I've found all inconsistencies?+

You don't, unless you iterate the entire dataset. Use a hash map to group, then validate each group in one pass. Missing a group means you'll return incomplete results. Walk through the example by hand to verify your grouping logic catches all cases.

Is this a hard problem for Citadel?+

No. It's a medium-difficulty filtering and grouping problem. The algorithmic bar is low. The real test is reading comprehension and implementation speed. You'll be done in 20 minutes if you understand the constraint.

What if there are no inconsistencies?+

Return an empty result, or return all logs as consistent, depending on what the problem asks. Re-read the output spec. This edge case trips up candidates who code without re-reading the problem statement.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Citadel.

OA at Citadel?
Invisible during screen share
Get it