Event Logs and Streams
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.
- A Premium questionCoding · Medium · Frequently asked
- A Premium questionCoding · Medium
- 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.
xAI interview guideKnow what xAI asks before you walk in.
25 coding · 2 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.