xAI·Backend Engineer·Technical Phone Screen
Apr 2026
Did a technical screen for a backend role at xAI that was basically one long multi-level coding problem about building an in-memory database from scratch. Four levels of increasing complexity, each one adding a new layer of pain. The kind of problem where level 1 feels easy and by level 4 you're questioning your life choices.
- Implement basic get, set, and delete operations for an in-memory key-value store where each key holds a map of string field-value pairs.
- Add scan and scan-by-prefix operations that return all fields (and their values) for a given key in lexicographical order.
- Extend all operations to support explicit timestamps, and add a set operation that accepts a TTL so fields automatically expire after a given interval.
- Implement backup and restore functionality where backup captures the full database state at a given timestamp (including remaining TTLs), and restore rolls the database back to the most recent backup at or before a given point in time.
“This part was fine.”