08-Lists01 - Chapter 8 Lists Strings Chapter 8 Lists Strings This material is based on contents the book “Data structures Algorithms and Software

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Chapter 8: Lists, Strings Chapter 8: Lists, Strings This material is based on contents the book: “Data structures, Algorithms, and Software Principles in C”, from T.A. Standish. USF – COP4530 – Data Structures Summer 2009 1 of 11 Lists Lists • Definition of List (L) – A List (L) of items of type (T) is a sequence of items. Usual operations are insertions and deletions of items, and others • Characteristics – They can be ordered or unordered – You can insert and delete list items in arbitrary places (applies for unordered) • Possible operations? USF – COP4530 – Data Structures Summer 2009 2 of 11 Lists Lists • Operations – Initialize the List L to be the empty list – Empty(L) determines whether or not the list L is empty – Length(L) gives length of a list L – Select i th item of a list L eplace i em X of a list L with a new item Y – Replace i th item, X, of a list, L, with a new item, Y, – Delete an item, X, from nonempty lit, L – Insert a new item X, into a list, L, in any arbitrary position raverse list L Traverse list L USF – COP4530 – Data Structures Summer 2009 3 of 11 Lists Lists – the interface the interface • ListInterface.h void Initialize(List *L); int Empty(List *L); int Length(List *L); ItemType Select(int Position, List *L); int Replace(int Position, ItemType x, List *L); nt Delete(int Position...
View Full Document

This note was uploaded on 12/28/2009 for the course COP COP 4350 taught by Professor Jimeno during the Summer '09 term at University of South Florida - Tampa.

Page1 / 11

08-Lists01 - Chapter 8 Lists Strings Chapter 8 Lists Strings This material is based on contents the book “Data structures Algorithms and Software

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

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