{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture02 - CS367 Intro to Data Structures 1 For Reading...

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 1 CS367 Intro to Data Structures CS367 Intro to Data Structures 1. For Reading Assignments: See Syllabus Link http://www.cs.wisc.edu/~cs367-1 1. Last CSL UNIX orientation session Today at 4pm 1221 CS 1. Schedule Exams! Tuesday, October 5th   7:15 pm - 9:15 pm Tuesday, November 9th   7:15 pm - 9:15 pm Saturday, December 18th   7:25 pm - 9:25 pm 1. If you haven't started A0, you're behind.
Background image of page 1

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 2 This Lecture This Lecture 5 A0 Questions Be sure to read the FAQs List Operations (cont) Array Implementation
Background image of page 2
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 3 Basic ListADT Operations Basic ListADT Operations 5 initialize init() (called by constructor) n add n void add(Object ob) n void add(int pos, Object ob) n access Object get(int pos) n boolean contains(Object ob) n boolean isEmpty() n int size() n remove Object remove(int pos)
Background image of page 3

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 4 List Interface List Interface interface ListInterface { void add(Object ob); void add(int pos, Object ob); Object get(int pos); boolean contains(Object ob); boolean isEmpty(); int size(); Object remove(int pos); }
Background image of page 4
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 5 ListArray (with stubs) ListArray (with stubs) public class ListArray implements ListInterface { public void add(Object ob) { } public Object get(int pos) { return null; } public boolean isEmpty() { return false; } public int size() { return -1; } ... }
Background image of page 5

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 6 List: Array Based List: Array Based 0 null count data List What data type? What size?
Background image of page 6
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 7 List: Array Based List: Array Based 0 count data List Object[] null null null null 0 1 2 3 4 length
Background image of page 7

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 8 List: Array Based List: Array Based eggs 0 count data List Object[] null null null 4 length 1 0 1 2 3
Background image of page 8
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 9 List: Array Based List: Array Based eggs 1 count data List Object[] null null bacon 4 length 2 0 1 2 3
Background image of page 9

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 35

Lecture02 - CS367 Intro to Data Structures 1 For Reading...

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

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