Reported August 2024
Googlehash table

Find Consistent Logs

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

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

Google's August OA included a log-consistency problem that looks like a filtering task but requires careful state tracking. You get raw logs, likely with timestamps or identifiers, and need to filter for entries that meet some consistency criteria. The trap is assuming you can process logs linearly without building context first. If you blank on the pattern during the live OA, StealthCoder will see the full problem and hand you the algorithmic shape in seconds. For now, expect hash tables, sorting by timestamp, or a two-pass scan.

Pattern and pitfall

Log consistency problems almost always hinge on deduplication, ordering, or matching entries across multiple logs or fields. You'll likely build a hash table or set to track what you've seen, then iterate through the logs with some rule: keep only unique IDs, or filter by timestamp windows, or match pairs. The gotcha is edge cases around sorting (do you sort input or preserve order?) and whether 'consistent' means exactly matching fields or following a pattern. The second pass is usually where the logic lives. StealthCoder becomes your safety net if the problem statement is ambiguous or you freeze on the data structure choice.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

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. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Google reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Find Consistent Logs FAQ

What does 'consistent' mean in a Google log problem?+

Usually: entries with the same ID or key should have matching values in a specific field, or duplicates should be removed, or logs should obey a temporal ordering. Read the problem twice. 'Consistent' is rarely defined in one sentence. Look for examples.

Do I need to sort the logs?+

Often yes. If timestamps or sequence matters, sort first. If the problem says 'in order received,' preserve insertion order and use a separate index. Default assumption: sort by the most logical field (timestamp, ID, or line number).

Hash table or set? What's the right data structure?+

Hash table (dict) if you need to store values and compare them. Set if you only care about presence or uniqueness. Start with a hash table keyed by ID or username. You'll iterate once to populate it, then once more to validate or filter.

How much time should I spend parsing the input?+

Two minutes max. Write a loop that splits each line and extracts the fields you need. Don't over-engineer parsing. Google OAs often give clean input. If it's messy, that's a signal the problem itself is the focus, not the parsing.

Is this problem still asked at Google in 2024?+

Yes. Log processing and consistency checks are evergreen in systems and backend roles. The exact wording changes, but the pattern (filter, dedupe, validate) stays. Expect a variant if they ask you about logs or data validation.

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

OA at Google?
Invisible during screen share
Get it