Dot product of run-length encoded vectors
A very long integer vector has many repeated values. Design a compact representation for it (for example, runs of value and count), then compute the dot product of two vectors stored that way without expanding them. Give the complexity in terms of the number of runs.
No answer yet. Write the first one; the best answer gets endorsed.

