seating is a pair [student_id, bench_id]: student student_id sat on bench bench_id.
The same entry may show up more than once; such a student still counts once for that bench. Return the largest number of different students on a single bench. If there are no entries, return 0.seating=[[4, 1], [7, 1], [4, 2], [9, 2], [12, 2]] → 3
Bench 1 holds students 4 and 7, bench 2 holds students 4, 9 and 12. The most is three.
seating=[[5, 3], [5, 3], [5, 3]] → 1
These are three records of the same student on the same bench, so they count once.
seating=[] → 0
seating=[[4, 1], [7, 1], [4, 2], [9, 2], [12, 2]]
3
Run checks the first 3 tests in your browser. Submit checks all 89 tests on the server, hidden ones included.