← Questions

Dot product of run-length encoded vectors

0
GoogleMetaCodingLast asked Nov 2026

A coding interview question asked in Meta's technical phone screen and at Google, last asked Nov 2026. It tests arrays, two pointers and compression.

Very long integer vectors contain long runs of repeated values. Design a compact representation that stores each run as a value and a length, and compute the dot product of two such vectors without expanding them.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Meta · Technical phone screen · Last asked Nov 202645 min · Two coding problems in CoderPad, about 20 minutes each · Usually no AI; some newer screens are AI-assisted
  • Google · Onsite coding · Last asked Jan 202645 min · Usually two rounds, mostly in person: whiteboard plus a Chromebook with Google Docs · No AI (a pilot code-comprehension round lets candidates use Gemini)

What it tests

arrays · two pointers · compression

Your code and the AI tutor open when you unlock this question.