LeetCode 378. Kth Smallest Element in a Sorted Matrix
来源:互联网 发布:淘宝口令红包怎么领取 编辑:程序博客网 时间:2024/05/21 04:42
class Solution {public: int kthSmallest(vector<vector<int>>& matrix, int k) { vector<int> a; vector<int>::iterator is; vector<vector<int>>::iterator it; for(it=matrix.begin();it!=matrix.end();it++) { for(is=(*it).begin();is!=(*it).end();is++) { a.push_back(*is); } } sort(a.begin(),a.end()); return a[k-1]; }};
0 0
- LeetCode—378. Kth Smallest Element in a Sorted Matrix
- Leetcode 378. Kth Smallest Element in a Sorted Matrix
- [leetcode] 378. Kth Smallest Element in a Sorted Matrix
- LeetCode 378. Kth Smallest Element in a Sorted Matrix
- 【leetcode】378. Kth Smallest Element in a Sorted Matrix
- 【Leetcode】378. Kth Smallest Element in a Sorted Matrix
- Leetcode-378. Kth Smallest Element in a Sorted Matrix
- 378. [LeetCode]Kth Smallest Element in a Sorted Matrix
- LeetCode 378. Kth Smallest Element in a Sorted Matrix
- LeetCode 378. Kth Smallest Element in a Sorted Matrix
- 【LeetCode】 378. Kth Smallest Element in a Sorted Matrix
- LeetCode 378. Kth Smallest Element in a Sorted Matrix
- LeetCode 378. Kth Smallest Element in a Sorted Matrix
- [LeetCode]378. Kth Smallest Element in a Sorted Matrix
- Leetcode 378. Kth Smallest Element in a Sorted Matrix
- LeetCode笔记:378. Kth Smallest Element in a Sorted Matrix
- LeetCode: 378. Kth Smallest Element in a Sorted Matrix
- leetcode 378. Kth Smallest Element in a Sorted Matrix
- Maven最实用settings.xml
- CvMat、Mat、IplImage之间的转换详解及实例
- 88. Merge Sorted Array
- 菜鸟的Linux学习史——第一章 Linux和Unix之间的关系
- python进阶17:__slots__
- LeetCode 378. Kth Smallest Element in a Sorted Matrix
- linux+Vim
- 简单的数据结构——顺序表
- #define的用法及与typedef的区别
- 为什么现在大多数服务器使用linux系统区别的一些总结
- 十九、Hive日志分析案例一
- WinEdit初使用
- 避免“锤子”心理
- 程序员进阶之路—如何独当一面