#C3340. Find the First Unique URL
Find the First Unique URL
Find the First Unique URL
You are given a list of URLs. Your task is to find and print the first URL in the list that appears exactly once. The comparison should be case-sensitive (i.e. 'Example.com' and 'example.com' are considered different).
If there is no unique URL, print an empty line.
Note: The first URL with a unique occurrence is defined as the one that, when traversing the list from beginning to end, is encountered only once.
Example:
- Input: ["google.com", "facebook.com", "google.com", "youtube.com", "yahoo.com", "youtube.com", "amazon.com"]
Output: facebook.com
inputFormat
The input is given from standard input (stdin) and is formatted as follows:
- An integer n representing the number of URLs.
- n lines each containing a URL string.
For example:
7 google.com facebook.com google.com youtube.com yahoo.com youtube.com amazon.com
outputFormat
Print the first unique URL to standard output (stdout). If no such URL exists, print an empty line.
## sample7
google.com
facebook.com
google.com
youtube.com
yahoo.com
youtube.com
amazon.com
facebook.com
</p>