Algorithm · Tradedesk · Easy
Problem Given a sentence containing words, count how many words include a letter repeated at least three times consecutively. Treat uppercase and lowercase forms of a letter as identical. A word is made up of English letters and is separated from neighboring words by whitespace. The implementation does not need to be optimal, but its time complexity must be no worse than O(sentence.length * longestWord.length) so that it remains within the time limits. Implement the…
Checking your access…