Hi,
The *EASIEST* way to do this:
struct{
int count
char * name
};
When you go through the list the 1st time, and you find an item that matches...
see if it is already in the list of items to be deleted. If its there,
increment its count.. if it's not, put it there and count=1. This would
probably work out to a O(n*log(n)) algorithm.
An even better solution is to keep the list sorted at all times, and then it
boils down to a simplistic problem of incrementing a count until a different
object is reached. This would be of O(n).
Scout