HubSpot Interview Question

Coding challenge about ngrams