Texas Instruments Interview Question

The coding question asked was WordLadder Leetcode question