Reported January 2026
Stripestring

Validate Timestamped Message Records

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

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

Stripe reported this one in January 2026, and it looks scarier than it is. Validate Timestamped Message Records is string parsing with a checklist. Split each line on tabs, drop the datetime prefix, and confirm exactly five non-empty fields remain. No graph, no DP, no clever data structure. If you've got an OA invite for Stripe this week, expect the difficulty to come from reading the spec carefully, not from the algorithm. If you blank on the edge cases mid-assessment, StealthCoder runs invisibly as a safety net and gives you the solution while you keep typing.

The problem

Validate records read from a message file. Each line begins with a datetime prefix followed by exactly five record fields.
For this practice adapter, fields are separated by tab characters. The first field is the datetime prefix and is removed before validating the record. A line is valid when exactly five record fields remain and every one is non-empty after trimming; the first record field is the name.
Return one boolean per input line in the same order.

Function
validateMessageRecords(lines: String[]) → boolean[]

Examples
Example 1
lines = ["2026-01-17T10:00:00Z\talice\tmessage\tfile-1\tready\thello","2026-01-17T10:01:00Z\t\tmessage\tfile-2\tready\thi","2026-01-17T10:02:00Z\tbob\tmessage\tfile-3\tready"]
return = [true,false,false]
The first line has five non-empty record fields. The second has an empty name, and the third has only four record fields.
Example 2
lines = ["ignored\tann\ttype\tpath\tok\tnote","ignored\tann\ttype\tpath\t \tnote"]
return = [true,false]
The datetime text is ignored. A whitespace-only record field is empty.

Constraints
1 <= lines.length <= 10000.
Each line has at most 10000 characters.
The datetime prefix itself is opaque and is not validated.
Only the five record fields must be non-empty after trimming spaces.
Tabs are the only field separators.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The problem reduces to this: for each line, split on the tab character, expect exactly six pieces (prefix plus five fields), then check that each of the last five is non-empty after trimming. Return a boolean per line in order. The trick is the split. Use a split that keeps trailing empty strings, because a line ending in a tab has an empty last field that must count and fail. In Java, split("\t", -1) does this. Default split drops trailing empties and gives you a false positive. Also trim before checking emptiness, since a whitespace-only field is invalid. Don't validate the datetime, it's opaque. Complexity is linear in total characters, which is fine for 10000 lines of 10000 characters. If the trailing-empty detail slips past you under the clock, StealthCoder is the hedge on the live OA.

If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.

If this hits your live OA

You can drill Validate Timestamped Message Records 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 by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Stripe reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Validate Timestamped Message Records FAQ

How hard is the Stripe Validate Timestamped Message Records question really?+

Easy on algorithm, easy to fumble on details. It's a single pass over lines with string splitting and a trim check. The failures come from trailing empty fields and whitespace-only fields, not from complexity. Write it clean and test those two cases.

What's the trick to this problem?+

Split on tab while preserving trailing empty strings, then require exactly six parts. The first is the ignored datetime prefix. The remaining five must each be non-empty after trimming. Count the parts before checking contents, so short lines fail fast.

Why does a default split give wrong answers here?+

Many languages drop trailing empty strings by default. A line like prefix, a, b, c, d followed by a tab has an empty fifth field, but a default split shows only four parts and may still fail correctly or miscount elsewhere. Use the keep-empties option to be safe.

Do I need to validate the datetime prefix?+

No. The constraints say the prefix is opaque and not validated. Example 2 uses the word ignored as the prefix and still returns true. Just remove it and check the five fields after it.

How do I prepare for this in 48 hours?+

Practice string parsing edge cases: empty tokens, trailing separators, whitespace-only values. Write this function once in your language, then test with a short line, an empty name, a whitespace field, and extra fields. Also check that more than five fields returns false.

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

OA at Stripe?
Invisible during screen share
Get it