Anonymous interview question

It was dp + hashing and array based