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 Assume that the LinkedIndexedList class supports an iterator. Write two code segments, one that uses an index-based loop and another that uses an iterator-based loop, to print all of the items in the list L. State the running time of each code segment using big-O notation.
3 This case study explores the development of a useful type of collection, the sorted list.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here