标签:erb tps .com problems length get var http code
public class Solution { public int KthSmallest(int[,] matrix, int k) { var row = matrix.GetLength(0); var col = matrix.GetLength(1); var list = new List<int>(); for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { list.Add(matrix[i, j]); } } list = list.OrderBy(x => x).ToList(); return list[k - 1]; } }
https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/#/description
标签:erb tps .com problems length get var http code
原文地址:http://www.cnblogs.com/asenyang/p/6848512.html