InterviewLegend

Event Logs and CSV Data

Alex Chen30 min readUpdated 47 real interview reports

Affirm's recent phone screens look a lot like a day of backend work. You get rows from an event log or a few CSV files and write the code that turns them into one answer.

Each one is a hash map pass underneath, keyed on whatever the rows share. The code is short once the rules are pinned down.

Date bounds, blank fields and rows that point at nothing all change the output, so settle those first and the code stays short. The older event-log problems are in The Machine-Coding Round.

The Affirm angle
Ask about the messy rows first. Is an end date inside its window? Does an empty string count as a value? What should a row with no match produce? None of that is in the prompt. Write each answer into the code where a reader can see it, then sort inside the function before you return so the interviewer can diff your result against theirs.

AffirmPremium lesson · Coding round

The 3 Affirm problems are below.

  1. A Premium questionCoding · Medium · Frequently asked
  2. A Premium questionCoding · Easy
  3. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the Affirm questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Affirm interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Affirm interview guide

Know what Affirm asks before you walk in.

24 coding · 2 system design · 13 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.