CSC_316_Midterm_Study_Guide_4

CSC_316_Midterm_Study_Guide_4 - Use of header and trailer...

Info icon This 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
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern