Morgan Stanley Interview Question

Design and implement an interface to filter iterator output