Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 367 Bytes

Question_2545.md

File metadata and controls

15 lines (13 loc) · 367 Bytes

LeetCode Records - Question 2545 Sort the Students by Their Kth Score

Attempt 1: Use Arrays.sort()

class Solution {
    public int[][] sortTheStudents(int[][] score, int k) {
        Arrays.sort(score, (a ,b) -> b[k] - a[k]);
        return score;
    }
}
  • Runtime: 2 ms (Beats: 92.73%)
  • Memory: 52.12 MB (Beats: 50.63%)