Most Frequent N-Gram

Write a function that takes a string s and an integer n, and returns the most frequent n-gram (substring of length n). If there's a tie…