What would be the best way to Sum Arraylist table different values?
For example we have a table:
Name Time(s) State
John 54 Florida
Mike 48 Texas
Kyrie 32 Texas
Joe 21 Florida
Josh 45 Cali
Robert 60 Texas
Let's say we have the table info stored in an Arraylist
What algorithm would you use to calculate the time totals of states?
The final result should look like this: