CS1302hw3 - Brad Wheeler 810 207 569 HW 3 1. Object State...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Brad Wheeler 810 207 569 HW 3 1. Object State Return Value size = 0; a linked Stack top = null; object for Strings size = 1; top = “C”; none _ size = 2; top = “A”; none _ size = 3; top = “M”; none _ _ “M” _ size = 2; top = “A” “M” _ _ “A” _ False; 2. Object State Return Value size = 0; front = null; A linked queue object rear = 1 st queue slot that stores strings. Size = 1; “C” front = “C”; rear = 2 nd queue slot ___ Size = 2; “C” “A” front = “C”; rear = 3 rd queue slot ___ Size = 3; “C” “A” “M” front = “C”; rear = 4 th queue slot ___ _ “C” Size = 2; “A” “M” front = “A”; rear = 3 rd queue slot “C” ___ “A” false Size = 1; “M” front = “M”; rear = 2 nd queue slot “A” ___ Size = 0; front = null; rear = 1 st queue slot “M” ___
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Brad Wheeler 810 207 569 HW 3 null____________ error, queue is empty 3. The cost should be O(n) because all of the operations for both ListQueues and ArrayQueues aside from clear are O(1). 1.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/13/2010 for the course CSCI 1302 taught by Professor Plow during the Fall '10 term at University of Hawaii, Manoa.

Page1 / 3

CS1302hw3 - Brad Wheeler 810 207 569 HW 3 1. Object State...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online