← Questions
Sorting complexity: beat O(n²), then design the worst correct sort
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A verbal round with no coding, asked as a quick series:
- Explain a sorting algorithm faster than O(n²) and why it is faster; be ready for quicksort's worst case.
- Name or invent the worst sorting algorithm you can that is still correct (always terminates, returns the input in order) and give its running time.
- If your slow sort tries orderings, how would you generate every permutation of the input?
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
