YouTube Interview Question

Design a class which is an efficient representation of a sparse vector.