Starting from:

$25

CCC-Assignment 10 A Password With Size N Solved

A password with size N can be found by searching the text for the frequent substring with N characters.

Given the size of the password and the encoded message, determine the password following the strategy given above.

To illustrate your task. consider the following example in which the password size is three (N: 3) and the text message is just baababacb'. The password would then be •aba', because filis is the substring with size 3 that  appears most often in the whole text (it appears twice) while the other six different substrings appear only once

(baa; aab; bab: bac; acb).

Input:

A text message and the length Of the password (1

Output:

Your program should print as output a line with the password string

Sample Input:

3

Sample Output:

More products