Alice implements Merge Sort so, on a particular machine, it requires exactly ⌈8n log n⌉ steps to sort n elements. Bob implements Heap Sort so it requires exactly ⌈5n log n⌉ steps to sort n elements. Charlie implements Selection Sort so it requires exactly 2n 2 steps to sort n elements. Suppose that Alice can sort 1000 elements in 1 minut
1. How many elements can Bob sort in a minute? How many can Charlie sort in a minute?
2. What is the largest value of n that Charlie can sort faster than Alice?
3. Charlie, devastated by the news from the last exercise, buys a computer that’s twice the speed of
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here