Run-Length Encoded Vector and Dot Product
A vector contains many consecutive identical elements.
- Design a memory-efficient representation of such a vector (e.g. run-length encoding).
- Compute the dot product of two equal-length vectors ...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
