Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm exam 1 review Fall2005: Properties and Data Structures

Back to Midterm Exam 1 Review Fall2005

Questions? Answers? Comments?



Array: A, C, D, G
REMOVEDked List: B, E, F, H

why, again, is an array easier to traverse?
Removed at KS request

Remember what the loops look like for doing each traversal. for (int i=0; i<array.length; i++){array[i]...} vs. current = this; while (current != null) {...current = current.getNext();}. Mark Guzdial

In an array you just go straight down the line, or in terms of computer memory from 00001 - 00002 etc. With a linked list yes they are all in line, but the individual pieces are scattered all over memory, and if you wanted to find the 9999/10000'th term, you'd have to find every last one before it instead of just skipping to the index.
Student165

thank you eli.



Link to this Page