Texas Instruments Interview Question

Find the highest n-gram frequency word from the given string with n given