Team high scores
A league's box-score feed has one row per player per team as "team,player,points" (points a non-negative integer; each player appears once). Return a dictionary mapping each team to the highest single-player points on that team. Example: ["hawks,ava,22", "hawks,raj,31", "owls,mia,18"] gives {"hawks": 31, "owls": 18}.
Implement
team_best(rows: list[str]) → dict[str,int]Examples
in
[["hawks,ava,22","hawks,raj,31","owls,mia,18"]]out{"owls":18,"hawks":31}What a strong answer looks like
State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
0:00 of about 11 min
solution.py
InputExpectedGot
[["hawks,ava,22","hawks,raj,31","owls,mia,18"]]{"owls":18,"hawks":31}not run yetsample