Unique names from a list of several duplicates

Here are a couple ideas. I think Approach #1 is ideal, but Approach #2 is a more direct answer to your question.

2 Likes