Description: You are provided a dictionary of words in a form of a list of size n.You have to find Longest String Chain Length as per following explanation:
From the dictionary, you pick up a word and in each step, you remove a single letter from it and check whether the remaining word is still in the dictionary. If the remaining word is present in the dictionary you increase the chain length by one. You perform the same operations until you are left with the last remaining word present in the dictionary.
Mind it, you have to remove every possible character in the string and check the remaining word for chain length.
Input :
a
b
ba
bca
bda
bdca
Output: 4
Input :
a
b
ba
bca
bda
bdca
Output: 4