

















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















































LECTURE 02: LINEAR DATA STRUCTURES
5
7
10 public E get(int index) { checkIndex(index); return this.getElement(index); } private E getElement(int index) { return (E) this.elements[index]; }
11 public E set(int index, E element) { checkIndex(index); E oldElement = this.getElement(index); this.elements[index] = element; return oldElement; }
16 public class LinkedList
17 private static class Node