Numerator interview question

Java collection