1.We are given two sentences A and B.(A sentence is a string of space separated words)
(Each word consists only of lowercase letters.)
2.A word is uncommon if it appears exactly once in one of the sentences
and does not appear in the other sentence.
3.You have to complete the function uncommonFromSenetences() which should return the array of all uncommon words.
4.You may return the array of strings in any order
Input Format
1.First line contains first senetence. 2.Second line contains second sentence.
Output Format
Return the array of string of words which are uncommon in both the sentences.
Constraints
1.0 <= A.length <= 200 2.0 <= B.length <= 200 3.A and B both contain only spaces and lowercase letters.
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
this apple is sweet this apple is sour
Output
sour sweet