X Interview Question

string manipulation program and remove duplicate words