






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
W2(b) Lecture Notes (Skrentny) Material Type: Notes; Class: Introduction to Data Structures; Subject: COMPUTER SCIENCES; University: University of Wisconsin - Madison; Term: Spring 2014;
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







for (int i = 0; i < L.size(); i++) { L.remove(i); }
public class SimpleArrayList
private E[] items; //the items in the List private int numItems; //the # of items in the List
public SimpleArrayList() {
//*** required ListADT methods ***
public void add(E item) { ... } public void add(int pos, E item) { ... } public E remove(int pos) { ... } public E get (int pos) { ... } public boolean contains (E item) { ... } public int size() { ... } public boolean isEmpty() { ... }
//*** additional optional array list methods ***
public boolean contains(E item) {