Object-Oriented Programming · Google · Medium
Requirements Part 1 — Representation design You are given a long integer vector containing many repeated values, such as [6, 6, 0, 0, 0, 2, 2, 2, 2]. Create a memory-efficient representation that records these repetitions without retaining every individual element. Compare the advantages and disadvantages of run-length entries (value, runLength), sparse entries (index, value), and representations that store differences from a chosen default value. Part 2 — Dot product Given…
Checking your access…