Capital One interview question

Hackerrank questions, involving max heap and KPM string matching algorithm