for a junior coder.
I would provide the algorithm, and ask him/her to code it.
Or ask how quicksort works, on paper.
But not both.
In fact, I am pretty sure I can't code proper quicksort in a hurry. That's what books/compilers/debuggers/unitttests are for.