InterviewLegend

Event Logs and Streams

Alex Chen30 min readUpdated 19 real interview reports

A few xAI problems hand you a stream of events and ask you to keep one figure up to date as it arrives. The input might be session records, a series of measurements, or the words of a document. One of the three problems below plays as a warm-up, and it's usually followed by a question about scale.

The code for each is short. The bugs come from the rules around it. Before you write anything, ask whether the log is sorted, how ties break, and what happens to a record that never closes. Say each answer out loud so the interviewer can correct you early.

Once the rules are settled, pick a structure that keeps the running figure cheap to update as each event arrives, then walk through a small example by hand before you run the code. The problems below are sorted with the most common first.

xAIPremium lesson · Coding round

The 3 xAI problems are below.

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

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

Get the xAI 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 xAI interview?Tell us what they asked. Reviewed before it goes in, never with your name.
xAI interview guide

Know what xAI asks before you walk in.

25 coding · 2 system design · 15 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.