CSC_316_Midterm_Study_Guide_4 - Use of header and trailer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
- Insertions are at the rear of the queue and removals are at the front of the queue Circular queues with modular indexing: - Front is index of the front element - Rear is the index immediately past the rear element size() return (N – f + r) mod N isEmpty() return (f == r) Queue Implementations: Using arrays Using linked lists Lists ADT: - Models a sequence of positions storing arbitrary objects - Establishes a before/after relationship between positions Singly and doubly linked lists
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Use of header and trailer nodes Generic List Insert and Delete Operations insert() - 1 delete() - 1 Vectors ADT:- Extends the notion of array by storing a sequence of arbitrary objects- An element can be accessed, inserted or removed by specifying its rank (number of elements preceding it) Array-Based Implementation Linked-Based Implementation Sequences ADT:- The union of the Vector and List ADTs- Elements accessed by rank or position...
View Full Document

Ask a homework question - tutors are online