1. Assume that the class ArrayStack supports an iterator. Write a code segment that prints all the items in the stack S but that does not use a for loop and does not alter S in any way.
2. Describe the strategy of quicksort and explain why it can reduce the time complexity of sorting from O(n2) to O(n log n).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here