Pocket Gems interview question

One: Strstr(); Two: find top k frequency number