FastPrepValidate Timestamped Message Records
Problems/Validate Timestamped Message Records

Validate Timestamped Message Records

Stripe logoStripe● EasyFULLTIMENEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Stripe phone screen. The source reports reading records from a file or an input stream, stripping a datetime prefix, requiring five tokens, rejecting an empty name, and discussing more defenses against bad input. It does not keep the delimiter or what the result looks like. We use tab-separated fields and a true-or-false result for each line, which is the smallest setup that gives one answer every time. Our version is about 62% the same as the reported question.

Validate records read from a message file. Each line begins with a datetime prefix followed by exactly five record fields.

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.

More Stripe Phone Screen questions

  • Business Account KYC Verification — Parts 1–5PHONE SCREEN · Seen Nov 2026
  • Financial Account LedgerOA · PHONE SCREEN · Seen Nov 2026
  • Merchant Matching, Parts 1–2: Shared Fields and Weighted ThresholdsPHONE SCREEN · Seen Nov 2026
  • Parse Boolean Rule ExpressionsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Merchant Payout Scheduler, Part 2: Per-Merchant SchedulesPHONE SCREEN · Seen Nov 2026
  • Transaction Fee Calculator — Parts 1–2: Basic Fee Calculation and Conditional Fee RulesPHONE SCREEN · Seen Nov 2026
  • Render a Task Tree from CSV RowsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Invoice / Payment ReconciliationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Linked Merchants Within Two HopsPHONE SCREEN · Seen Nov 2026
  • Portfolio Valuation, Part 1PHONE SCREEN · Seen Nov 2026

Similar questions at other companies

  • Restricted Decimal Number ValidatorLinkedIn · PHONE SCREENLinkedIn interview questions
  • Extensible Grep Line FilterBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Format CSV Rows as an ASCII TableAmazon · PHONE SCREEN
  • Compare Calendar DatesWells Fargo · PHONE SCREENWells Fargo interview questions
  • CSV Row SerializerMercor · PHONE SCREENMercor interview questions
  • Host Log ParserVerkada · PHONE SCREENVerkada interview questions
  • Length-Prefixed String CodecSnowflake · PHONE SCREENSnowflake interview questions
  • Query Log MatchDatadog · PHONE SCREEN · ONSITE INTERVIEWDatadog interview questions
  • Machine Message RouterOpenAI · PHONE SCREENOpenAI interview questions
  • Parse and Query Server LogsKikoff · PHONE SCREENKikoff interview questions

Interview reports that mention this question

  • Stripe New Grad Coding Patterns, 2026 Guide
  • Stripe New Grad Interview Question Bank: 47 Problems

Stripe interview experiences

  • Stripe New Grad SWE OA and Phone Screen: 2 Experiences
  • Stripe Experienced SWE OA and Onsite Questions: 3 Experiences
  • Stripe SWE Intern Linked Merchants Team Screen: 1 Experience
  • Stripe OA: What It Tests (2026)
All Stripe interview questionsSee Stripe hiring insights
Saved
class Solution {
    public boolean[] validateMessageRecords(String[] lines) {
      // write your code here
    }
}
Checking account…