Tap here to switch tabs
Problem
Submissions

Problem: Maximum Students on a Single Bench

med
30 min
Try to solve the Maximum Students on a Single Bench problem.

Statement

You are given a 22D integer array students, where each element students[i] = [student_id, bench_id] represents that a student with identifier student_id is sitting on the bench with identifier bench_id.

Return the maximum number of unique students sitting on any single bench. If students is empty, return 00.

Constraints:

  • 0≤0 \leq students.length ≤100\leq 100

  • students[i] = [student_id, bench_id]

  • 1≤1 \leq student_id ≤100\leq 100

  • 1≤1 \leq bench_id ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Students on a Single Bench

med
30 min
Try to solve the Maximum Students on a Single Bench problem.

Statement

You are given a 22D integer array students, where each element students[i] = [student_id, bench_id] represents that a student with identifier student_id is sitting on the bench with identifier bench_id.

Return the maximum number of unique students sitting on any single bench. If students is empty, return 00.

Constraints:

  • 0≤0 \leq students.length ≤100\leq 100

  • students[i] = [student_id, bench_id]

  • 1≤1 \leq student_id ≤100\leq 100

  • 1≤1 \leq bench_id ≤100\leq 100