On an ArrayList calling .get(int) is basically an index operation. On a LinkedList calling .get(int) causes you to walk down the List starting at the first node until you get the the correct index. So you go from a O(1) operation to a O(n^2) operation. was trying to superscript the 2, didn't work
[ February 03, 2005: Message edited by: Steven Bell ] [ February 03, 2005: Message edited by: Steven Bell ]
You may find a solid data-structures foundation in many data-structures and algorithms book. I think a good java programmer should already be familiar with them.
You may find a solid data-structures foundation in many data-structures and algorithms book. I think a good java programmer should already be familiar with them.