figure aundesired uniques setbdesired uniques set algorithm repeatedwordcount(value prevalue postthe number of repeated words in value is returned words value split(' uniques set foreach word in words uniques add(word strip() end foreach return words length -uniques count end repeatedwordcount you will notice in the repeatedwordcount algorithm that we use the strip method we referred to earlier in ss this simply removes any punctuation from word the reason we perform this operation on each word is so that we can build more accurate unique string collectione "test"and "test!are the same word minus the punctuation figure shows the undesired and desired sets for the unique set respectively determining the first matching character between two strings the algorithm to determine whether any character of string matches any of the characters in another string is pretty trivial put simplywe can parse the strings considered using double loop and checkdiscarding punctuationthe equality between any characters thus returning non-negative index that represents the location of the first character in the match (figure )otherwise we return - if no match occurs this approach exhibit run time complexity of (