Meta interview question

Given two sparse matrices, how would you compute the dot product?

Interview Answers

Anonymous

3 Oct 2017

Provided a tuple implementation. Did get confused on the efficiency. Suggested a dictionary but then realized memory wise, tuples are better.

1

Anonymous

8 Oct 2018

import numpy numpy.dot(a,b)