Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Which data structure can be used to efficiently check if a string exists in startWords?
After appending a letter, all letters of a string can be rearranged in any possible way. How can we use this to reduce our search space while checking if a string in targetWords can be obtained from a string in startWords?