Maximum Permutation | HackerRank

Find the permutation that occurs the maximum number of times as a substring.