Section2Key 3 - , 9. One possible solution appears below....

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: , 9. One possible solution appears below. public Arrayfntlist () { runningTotal = new Arraylntlist Arrayfntlist result (this. elementData. Iength) (size > 0) { if result.elementData [0] = this.elementData [0] ; j- = 1; i < this.size; (int for i++) = result.elementData resuLt.elementData Ii] 1] Ii + this.eJ.ementData Ii] ; ) resul-t . size : this. size; return result; 10. One possible ; solution appears bel_ow. () I; { ! +: public boolean ispairwiseSorted (int for i = 0; i < size (elementData lil if return faLse; return true i ) 11. One possible public if sol-ution appears below. 2l void removeFront (int n) { (n throw new IllegalArgumentException O; (int for i - n; i < size; i++) elementData Ii - n] : elementData Ii] ; size -= n; ) ...
View Full Document

This note was uploaded on 11/03/2009 for the course CSE 143 taught by Professor Sr during the Spring '08 term at University of Washington.

Ask a homework question - tutors are online