Morgan Stanley interview question

Design and implement an interface to filter iterator output