"How can I count the unique values in a set of 70 million 64-bit numbers?"
"Put them in a vector, sort them, and run unique."
"A map uses too much RAM."
"Yes. That's why you should use a vector."
"But a vector won't tell me how many unique numbers there are!"
"It will if you sort them and run unique."
"Oh. What does unique do?"
"It takes a sorted array and eliminates all the duplicates."
"How does it work?"
"(briefly implements unique)"
"But that looks like it will only work if the array is sorted!"
"Yes. That's why you sort it first."
"Oh. Okay. What do I do after I sort it?"