Update word ladder

can't pass large tests. Maybe I should create an array to indicate the validation of elements in dict and create another table to determine if the distance between two words equals one.