Creates sub strings of n length from the given string. This is extremely useful in string/name search.
Applicable Scenarios and Problems
This algorithm is extremely useful for name/string based search engines. I personally used this to find Products from the name provided in receipts.
The input is taken as a dictionary of 2 elements; 0th index holding the word and 1st index holding the n value for the NGram algorithm
Spits out a list of words of length n that make up the given name