Programming Question-6 use hashset