HTMLify
LeetCode - Sort the Students by Their Kth Score - Go
Views: 360 | Author: abh
1 2 3 4 5 6 7 8 9 10 | func sortTheStudents(score [][]int, k int) [][]int { for i:=0; i<len(score); i++ { for j:=i; j<len(score); j++ { if score[i][k] < score[j][k] { score[i], score[j] = score[j], score[i] } } } return score } |