simple implementation of a set... sorted list with no duplicates O(log n) to see if contains an item (binary search) O(n) to add an item in sorted position interesting methods: union, intersection, subtract... all variants of the merge routine that is part of mergesort union: while(iab[ib]) { result[k++]=b[ib++]; } else { // == result[k++]=b[ib++]; ia++; } } while(iab[ib]) { ib++; } else { // == result[k++]=b[ib++]; ia++; } } subtract: while(iab[ib]) { ib++; } else { // == ia++; ib++; } } while(ia power of HashMap: given an array of ints, find if any two sum to k for(int i=0;i