884. Uncommon Words from Two Sentences
Approach 1: Counting
For both of the arrays we will simply count the number of times a word occurs. If in the end a word has a count of one then we can return a list of those words.
Time Complexity: O(M+N)
Space Complexity: O(M+N)
Last updated