You are developing a web browser (something like e.g.
Netscape, etc.) and need to display all visited links on a page. The
visited links need to use a different color then that used to display
scheme than the unvisited links. Now, given a history of links you
have visited before, how would you go about writing the piece of code
that makes the determination if you have seen this link before? Answer
or not? The answer could be a simple string comparison, but then think
about the time it will take for the client to render any HTML page.
Alternatively, so, given a history of URLs, come-up with an elegant
way (algorithm, data structures, etc.) to make the determination if a
given link already exists in the history list?