Explanation of this TC


#1

Input 1:
A = “hit”
B = “cog”
C = [“hot”, “dot”, “dog”, “lot”, “log”]

Output 1:
5

Explanation 1:
“hit” -> “hot” -> “dot” -> “dog” -> “cog”

what about:
hit->hot->lot->log->cog


#2

Both are the same/ have the same effects on length of transformation.
To this Question :
You are a good question.
I was earlier thinking of a brute force approach O( 26*25).
Bfs is good.