Sponsored
Use these hints if you're stuck. Try solving on your own first.
What data structure can help you to determine if an element exists?
Would a hash table help?
Solve with full IDE support and test cases