Design compressed vector and compute dot product
Company: Google
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Onsite
Quick Answer: This question evaluates understanding of data structure design, sequence compression concepts (such as run-length patterns), and numeric algorithm efficiency for computing operations like the dot product, within the Coding & Algorithms domain, and it probes both conceptual understanding and practical application for large-scale data and engineering trade-offs. It is commonly asked to assess the ability to represent long repeating runs compactly and to reason about space/time complexity, iteration semantics, and edge cases such as differing run boundaries and accumulation/overflow concerns without relying on full decompression.