Skip to content

Commit

Permalink
Update longest_dictionary_word_test.go
Browse files Browse the repository at this point in the history
The comment provided an incorrect example; if the example given was really "cat", no words would be given back, as not a single string would contain all the letters.
  • Loading branch information
ytcalifax authored Feb 5, 2025
1 parent 04424ce commit e5673bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strings/longest_dictionary_word_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ TestLongestDictionaryWordContainingKey tests solution(s) with the following sign
Given a key as string, and a slice of strings containing a dictionary of words, return the longest
word that contains all letters of the key.
For example given "cat" and {"rectify", "race", "archeology", "racoon"}, it should return "archeology",
because "archeology" is the longest word in the given set that contains "c","a",and "t".
For example given "car" and {"rectify", "race", "archeology", "racoon"}, it should return "archeology",
because "archeology" is the longest word in the given set that contains "c","a",and "r".
*/
func TestLongestDictionaryWordContainingKey(t *testing.T) {
tests := []struct {
Expand Down

0 comments on commit e5673bd

Please sign in to comment.