← Questions

Sort an array with k worker threads

0
SpaceXAICodingLast asked Sep 2026

A coding interview question asked in SpaceXAI's onsite applied coding round, last asked Sep 2026. It tests concurrency, sorting and heap.

Implement parallel_sort(nums: list[int], k: int) -> list[int], which returns every element of nums in ascending order and uses k worker threads for the heavy lifting.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

concurrency · sorting · heap · k-way merge

Your code and the AI tutor open when you unlock this question.