Print the Non-repeating words

Print all the non-repeating words out of two given sentences.

Give the Best way to implement this.

Eg. Statement 1: I have a blue pen.
Statement 2: I got a red pen.
Output : have blue got red

Author: saksham seth
Login to Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer