Longest String Chain

You are given a list of lowercase words. A word shorter can precede a word longer in a chain when longer can be formed by inserting exactly one character anywhere in shorter, without changing the order of the characters already present.

Return the greatest possible number of words in a valid chain. Each word may be used at most once, and the input order does not impose an order on the chain.

For example, a -> ba -> bca -> bdca is valid because each step adds one character while preserving the earlier characters. Words that do not connect to another word still form a chain of length one.

Examples
Input: ["a","ba","bca","bdca"]
Output: 4
Hints

Longest String Chain

You are given a list of lowercase words. A word `shorter` can precede a word `longer` in a chain when `longer` can be formed by inserting exactly one character anywhere in `shorter`, without changing the order of the characters already present.