Ryan Kightlinger November 21, 2002 Assignment 8 Page 326 - 2,3,4 2.) queue1.enqueue(1) queue2.enqueue(2) queue2.enqueue(3) queue2.enqueue(4) queueFront = queue1.dequeue() queueFront = queue2.peek() queue1.enqueue(queueFront() queue1.enqueue(5) queueFront = queue2.dequeue() queue2.enqueue(6) queue1 = 2 3 5 queue2 = 4 6 3.) a.) abcda a d c b a ------- stack Queue: a ---> b ----> c ---> d ---> a The string is not a palindrome, because the letter "d" doesn't match up with the letter "b" when performing the operations for the stack and queue. b.) radar r a d a r ---------- stack Queue: r --> a ---> d ----> a -----> r The string is a palindrome, because the letters from both the stack and queue match up evenly. 4.) a.) queue b.) list c.) list d.) stack e.) list f.) queue g.) stack h.) stack i.) queue j.) queue k.) queue l.) stack