Instead of comparing the letter to each letters in the table like the one suggested in the video, why not store each letters into an array that correspond to the word length. For example for the word “boom” we store it to an array length of 4 then storing each letter into the array while comparing if there is a duplicate, once it founds a duplicate the loop ends. Would this use less iteration than comparing a letter to all the alphabetical letters in a table/array?
I hope you get my point, not a native English speaker.