YouTube interview question

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