Modify duplicate names in an array with counts
Filed under Cloudera
The question
Given an array of strings of people's names, print the array after modifying it such that names occurring more than once have a count appended starting from the second occurrence.
No write-up yet. Related questions below have one.
Related Cloudera questions
Collected from public candidate posts and coding forums. Updated Nov 2026.