1
0

944.cpp 411 B

123456789101112131415161718
  1. #include <string>
  2. #include <vector>
  3. class Solution {
  4. public:
  5. int minDeletionSize(std::vector<std::string>& strs) {
  6. int ans = 0;
  7. for(int i = 0;i<strs[0].size();i++){
  8. for (int j = 1; j < strs.size(); j++) {
  9. if (strs[j][i] < strs[j-1][i]) {
  10. ans++;
  11. break;
  12. }
  13. }
  14. }
  15. return ans;
  16. }
  17. };
备用站点 当前处于降级运行的备用站点,仅供应急访问,数据和功能可能不是最新。