← Questions

Multiply two sparse matrices

0
AppleMetaNetflixCodingLast asked Sep 2026

A coding interview question asked in Netflix's coding / problem solving round and at Apple and Meta, last asked Sep 2026. It tests matrices and hash map.

Multiply two integer matrices A (m x k) and B (k x n) that are mostly zeros, and return the dense m x n product. Do no work for products where either factor is zero, and leave both inputs unchanged.

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

  • Netflix · Coding / problem solving · Last asked Sep 2026Live coding on under-specified requirements
  • Apple · Technical phone screen · Last asked May 2026
  • Meta · Technical phone screen · Last asked Feb 202645 min · Two coding problems in CoderPad, about 20 minutes each · Usually no AI; some newer screens are AI-assisted

What it tests

matrices · hash map

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