力扣:6. Z 字形变换

 

class Solution {
    public String convert(String s, int numRows) {
      int g=s.length();
      if (numRows == 1 || numRows >= g) {
            return s;
        }
      int t = numRows * 2 - 2;
      int numlei = (g+t-1)/t*(numRows-1);
      char [][] charList =new char [numRows][numlei];
       int o=0;
        int k=0;
    for (int h=0;h

你可能感兴趣的:(数组,leetcode,算法)