•The indefinite vector has properties that make it an attractive alternative to sets and maps. It has less storage overhead, since there's no element node (just the element). And
the elements are allocated, so the cost
of insertion is relatively low (since only pointers to elements are moved, not elements).
•Here we use a binary search to find the insertion position such that the vector always remains
sorted.
•A separate array of cursors, that we sort after collecting all the words, isn't necessary when using a vector, since we can explicitly sort the vector itself.