A string is not convertible to another string under these 2 conditions:
A character transforms into more than one character:
"aaa" -> "hgf" is not possible.
The second string contains all possible letters:
When both strings contain same letters as in: "abc" -> "bca", we can convert individual letters without making them same by temporarily converting them to another letters like this:
"abc" -> "dbc" -> "dba" -> "dca" -> "bca"
As long as we have a letter not present in the destination string, we can do such temporary conversions.
https://leetcode.com/problems/string-transforms-into-another-string/
Resolves: #239
Algorithm:
A string is not convertible to another string under these 2 conditions:
"aaa" -> "hgf"
is not possible."abc" -> "bca"
, we can convert individual letters without making them same by temporarily converting them to another letters like this:"abc" -> "dbc" -> "dba" -> "dca" -> "bca"
As long as we have a letter not present in the destination string, we can do such temporary conversions.We only have to check for these.