xAI coding question, reconstructed from 1 candidate report (December 2025). Tests: binary search. The write-up includes a Python solution that passes 5 test cases.
The full problem statement — full requirements, constraints, and edge cases
Approach and trade-offs — what passing candidates did, and the mistakes that sink people
Unlock the full xAI catalog
Full problem statements, candidate-reported follow-ups, and walkthroughs — for every xAI question.