{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Sequences - Sequences 8:57 AM Outline and Reading Singly...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
4/1/2003 8:57 AM Sequences 1 Lists and Sequences 4/1/2003 8:57 AM Sequences 2 Outline and Reading Singly linked list Position ADT and List ADT (§5.2.1) Doubly linked list (§ 5.2.3) Sequence ADT (§5.3.1) Implementations of the sequence ADT (§5.3.3) Iterators (§5.5) 4/1/2003 8:57 AM Sequences 3 Singly Linked List A singly linked list is a concrete data structure consisting of a sequence of nodes Each node stores element link to the next node next elem node A B C D 4/1/2003 8:57 AM Sequences 4 Stack with a Singly Linked List We can implement a stack with a singly linked list The top element is stored at the first node of the list The space used is O ( n ) and each operation of the Stack ADT takes O (1) time t nodes elements 4/1/2003 8:57 AM Sequences 5 Queue with a Singly Linked List We can implement a queue with a singly linked list The front element is stored at the first node The rear element is stored at the last node The space used is O ( n ) and each operation of the Queue ADT takes O (1) time f r nodes elements 4/1/2003 8:57 AM Sequences 6 Position ADT The Position ADT models the notion of place within a data structure where a single object
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the 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