7 List and Iterator ADTs
7.1 The List ADT
1 | size(); |
7.2 Array Lists
dynamic array based on List.
7.2.1 Dynamic Arrays
7.2.2 Implementing a Dynamic Array
7.2.3 Amortized Analysis of Dynamic Arrays
7.2.4 Java’s StringBuilder class
7.4 Iterators
1 | import java.util.Iterator; |
7.5 The Java Collections Framework
7.5.1 List Iterators in Java
1 | add(e); |
7.5.2 Comparison to Our Positional List ADT
7.5.3 List-Based Algorithms in the Java Collections Framework
1 | import java.util.Collections |
Converting Lists into Arrays:1
2toArray();
toArray(A);
Converting Arrays into List:1
asList(A);
7.6 Sorting a Positional List
8 Trees
9 Priority Queues
1 | insert(k, v); |
java.util.Priority
10 Maps, Hash Tables, and Skip Lists
10.1 Maps
java.util.Map;
Count word frequency
10.2 Hash Tables
Sorted Maps
Applications:
Flight Databases
Maxima Sets;