Linked Lists a - UAH CPE 212 Fundamentals of Software Engineering Agenda Class 10 Linked Lists Linked Lists Key Concepts UAH CPE 212 Today Last

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

View Full Document Right Arrow Icon
UAH CPE 212 Fundamentals of Software Engineering Agenda Class 10 Linked Lists Linked Lists Key Concepts
Background image of page 1

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

View Full DocumentRight Arrow Icon
UAH CPE 212 Today Last Time Lists This Time Linked Lists
Background image of page 2
UAH CPE 212 Linked Lists Non-Contiguous (Usually) Linear Structures. Can be Homogeneous or Heterogeneous. Can Be Singly Linked or Doubly Linked Common Examples Text Editors Stacks Queues Circular Lists (Rings) Head Head
Background image of page 3

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

View Full DocumentRight Arrow Icon
UAH CPE 212 TradeOffs Feature Arrays Linked Lists Sequential Access Efficient Efficient Random Access* Efficient Inefficient (Searching) (Fixed Cost) (Variable Cost) Resizing/Insertion/Removal Inefficient Efficient Size Determination Array Size Count Elements Overhead Size: None 1 or 2 pointers Speed: 1 Multiply Sequential Compares Other Single Insert Before *Yes you can define a subscript operator on a list
Background image of page 4
UAH CPE 212 Common Operations Singly Linked Insert Remove Head Head
Background image of page 5

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

View Full DocumentRight Arrow Icon
UAH CPE 212 Common Operations Doubly Linked Insert Remove Head Head
Background image of page 6
UAH CPE 212 Linked List #ifndef LINK1_H #define LINK1_H #include <stdlib.h> // Provides size_t struct Node { typedef double Item; Item data; Node *link; }; // FUNCTIONS for the linked list toolkit size_t list_length(Node* head_ptr); void list_head_insert(Node*& head_ptr, const Node::Item& entry); void list_insert(Node* previous_ptr, const Node::Item& entry); Node* list_search(Node* head_ptr, const Node::Item& target);
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2008 for the course CPE 212 taught by Professor Skipper during the Spring '07 term at University of Alabama in Huntsville.

Page1 / 15

Linked Lists a - UAH CPE 212 Fundamentals of Software Engineering Agenda Class 10 Linked Lists Linked Lists Key Concepts UAH CPE 212 Today Last

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

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