FastPrepRecord Linkage Part 1 - Directly Linked Records
Problems/Record Linkage Part 1 - Directly Linked Records

Record Linkage Part 1 - Directly Linked Records

Stripe logoStripe● MediumFULLTIMENEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: July 26, 2026 — 🌺 I re-audited the original author-written source and rebuilt this practice version from the available interview report. It is about a 90% match to the available source. The record fields, per-field weights, similarity threshold, target record, and direct-link objective come directly from the author-written phone-screen report, which also includes a worked dataset. FastPrep supplies exact string equality as the runnable field-similarity function, the CSV String[] adapter, deterministic sorting, constraints, and additional examples without changing the reported graph-linkage task.

You are given user records and must decide which records are linked to a target record using weighted field similarity.

Inputs:

  • rows: a String[] where each entry is "id,name,email,company" (id is an integer).
  • weights: a String[] where each entry is "field,weight" for a field in {name, email, company}; the weights sum to 1.
  • threshold: a similarity cutoff.
  • targetId: the id of the target record.

The similarity between two records is the weighted sum over the fields of per-field equality (contribute the field's weight when the two records have the same value for that field, otherwise 0). Two records are linked when their similarity is >= threshold.

Return the ids of all records directly linked to the record with targetId (excluding the target itself), as an int[] sorted in ascending order.

Function

findLinkedRecords(rows: String[], weights: String[], threshold: float, targetId: int) → int[]

Examples

Example 1

rows = ["1,Alice,alice@gmail.com,Stripe", "2,Alicia,alice@gmail.com,Stripe", "3,Alice,alice@yahoo.com,Google", "4,Bob,bob@gmail.com,Stripe"]weights = ["name,0.2", "email,0.5", "company,0.3"]threshold = 0.5targetId = 1return = [2]

Compare each record to record 1 (Alice, alice@gmail.com, Stripe). Record 2: name differs (0), email same (+0.5), company same (+0.3) = 0.8 >= 0.5 -> linked. Record 3: name same (+0.2), email differs, company differs = 0.2 < 0.5 -> not linked. Record 4: name differs, email differs, company same (+0.3) = 0.3 < 0.5 -> not linked. Only record 2 is directly linked.

Example 2

rows = ["1,Alice,alice@gmail.com,Stripe", "2,Alicia,alice@gmail.com,Stripe", "3,Alice,alice@yahoo.com,Google", "4,Bob,bob@gmail.com,Stripe"]weights = ["name,0.2", "email,0.5", "company,0.3"]threshold = 0.5targetId = 4return = []

Record 4 is Bob, bob@gmail.com, Stripe. Against record 1: only company matches (0.3). Against record 2: only company matches (0.3). Against record 3: nothing matches (0). All below the 0.5 threshold, so record 4 has no direct links.

Constraints

  • Each row is "id,name,email,company" with an integer id.
  • Each weight entry is "field,weight" over {name, email, company}; weights sum to 1.
  • Similarity = sum of weights of fields whose values are equal between the two records.
  • Two records are linked when similarity >= threshold.
  • Return the ascending-sorted int[] of ids directly linked to targetId, excluding the target.

More Stripe Phone Screen questions

  • Merchant Payout Scheduler, Part 2: Per-Merchant SchedulesPHONE SCREEN · Seen Nov 2026
  • Financial Account LedgerOA · PHONE SCREEN · Seen Nov 2026
  • Business Account KYC Verification — Parts 1–5PHONE 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
  • Account Roles With Parent-User InheritancePHONE SCREEN · Seen Nov 2026
  • Merchant Payout Scheduler, Part 3: Hold PeriodsPHONE SCREEN · Seen Nov 2026
  • Merchant Payout Scheduler, Part 1PHONE SCREEN · Seen Nov 2026

Similar questions at other companies

  • Group AnagramsWorkday · PHONE SCREEN
  • Apply Operations to Make a String EmptyFlexport · PHONE SCREENFlexport interview questions
  • Word BreakAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Group AnagramsEPAM · PHONE SCREENEPAM interview questions
  • Underline Shortest Unique SubstringsMoveworks · PHONE SCREENMoveworks interview questions
  • Find Duplicate File GroupsAnthropic · PHONE SCREENAnthropic interview questions
  • Invalid TransactionsBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Query Log MatchDatadog · PHONE SCREEN · ONSITE INTERVIEWDatadog interview questions
  • Underline Shortest Unique SubstringsAtlassian · PHONE SCREENAtlassian interview questions
  • Insert an Employee into an Organization HierarchyWaymo · PHONE SCREENWaymo interview questions

Interview reports that mention this question

  • Stripe Experienced MLE Phone Screens: 1 Experience
  • Stripe New Grad Coding Patterns, 2026 Guide
  • Stripe New Grad Interview Question Bank: 47 Problems
  • Stripe New Grad Screens and Onsites: 9 Experiences (Part 2 of 2)

Stripe interview experiences

  • Stripe SWE Onsite over Two Days: 1 Experience
  • Stripe New Grad SWE Phone Screen and Onsite: 2 Experiences
All Stripe interview questionsSee Stripe hiring insights
Saved
class Solution {
    public int[] findLinkedRecords(String[] rows, String[] weights, float threshold, int targetId) {
      // write your code here
    }
}
Checking account…