xAI coding question, reconstructed from 1 candidate report (October 2026). The write-up includes a Python solution that passes 10 test cases.