Minimum Cost to Convert String I
Treat the 26 letters as graph nodes, run Floyd-Warshall for the cheapest conversion between every pair, then sum the cost per position.
Treat the 26 letters as graph nodes, run Floyd-Warshall for the cheapest conversion between every pair, then sum the cost per position.