1. Write classes that would allow you to store the linked structure described under the Test Prep- LStruc link for Sessions/May 6
2. Suppose you had a stack called Junk of Strings. Suppose you did the following opperations:
Push(“Ed”) Push (“Sue”) Push(“jim”) Pop Pop Push(“Jill”) Pop Push (“Tom”) Pop
What would the stack look like at the end.. Show top and bottom of the stack
3. Write a push method for Junk, assuming top was an integer pointing to the top element of an array of Strings
4. Suppose you had a queue of integers and did the following opperations:
enq(56) enq(32) deq enq(67) enq(21) deq deq enq(78) enq(36) deq deq
Show the status of the queue after the following opperations, assuming first points to the first of the queue and last points to the end of the queue
5. Show how to make a Binary Search Tree node to hold a linked structure holding name and ages
6. Suppose you entered the following values into a BST 45, 64, 21, 89, 78, 34, 92, 91, 73, 38, 99, 89, 46
7. Show what the BST would look like
8. Show how you could store this in an array
|