hash("Pat Summitt") = 6 hash("Cutcliffe") = 5 hash("Rod Delmonico") = 2 hash("Phil Fulmer") = 0
0: empty 1: Cutcliffe, Pat Summitt 2: Phil Fulmer 3: empty 4: Rod Delmonico
0: Empty 1: Pat Summitt 2: Phil Fulmer 3: Cutcliffe (Cutcliffe hashes to 1 but collides with Pat Summitt) 4: Rod DelmonicoWhen Cutcliffe is inserted, Pat Summitt is already at location 1 so your algorithm starts moving linearly through the hash table. Phil Fulmer already occupies location 2 but location 3 is empty, so Cutcliffe ends up in location 3.
typedef struct { double cumulative_score; int number_of_scores; } person;