Unformatted text preview: return true; } bool frontValue(Elem& it) const { if (isEmpty == true) return false; // Empty it = listArray[front]; return true; } virtual int length() const { if (isEmpty == true) return 0; return ((rear+size) - front + 1) % size; } }; 4.14 bool palin() { Stack<char> S; Queue<char> Q; while ((c = getc()) != ENDOFSTRING) { S.push(c); Q.enqueue(c); } while (!S.isEmpty()) { if (S.top() != Q.front()) return FALSE; char dum = S.pop(); dum = Q.dequeue(); } return TRUE;...
View
Full Document
- Fall '08
- BELL,D
- Void type, dum, const Elem, Elem[size];
-
Click to edit the document details