Given a set of records of the form (ticket no, person name), ticket nos. are unique. find the person having the maximum number of tickets.
I think Hashmap could be an approach for this question but here the ticket no. are unique.So, how can we get the person with maximum number of lottery tickets? Wouldn't we need another structure which will hold the information concerning each person.In initial problem we cannot have person name as the key of hashmap as names cannot be unique.
Any idea how can we do this?