Xai Software Engineer Interview Questions
Practice the exact questions companies are asking right now.
Implement an in-memory database with TTL and backup
In-Memory Database (Levels 1–4: TTL and Backup/Restore) Implement an in-memory database that stores records identified by a string key. Each record co...
Fix race condition in concurrent deposit
Concurrent bank account debugging (thread safety) You are given a simple BankAccount object that is used concurrently from multiple threads. Two depos...
Explain process vs thread and memory-sharing risks
You are asked about OS concurrency fundamentals. Prompt 1. What is the difference between a process and a thread? 2. Do processes and threads share me...
Design backend to score and classify tweets
You are asked to build a small backend application that processes Twitter data and uses an external LLM-style API to score and classify each tweet. Re...
Contrast processes and threads
What are the differences between processes and threads? Compare memory isolation, resource ownership, scheduling, context-switch cost, inter-process c...
Explain ACID and transactions
ACID Transactions: Definitions, Enforcement, Isolation Levels, and Example Context You are designing a service backed by a relational database that su...
Explain and Implement Strings
Question What is a string in programming languages? Inside a struct string{} in Rust, what fields are stored and how would you design and implement on...
Define and compare smart pointers
What is a smart pointer? How do smart pointers manage ownership and lifetimes compared with raw pointers? Describe common types (unique, shared, weak)...
Explain arrays and memory layout
What is an array? How is an array represented in memory (contiguous layout, element size and alignment, indexing arithmetic). Analyze time complexitie...
Explain strings, moves, and concurrency
Question What is a string in programming languages? What fields are stored in a typical struct string and how would you implement one yourself? What i...