public String convertOld(String s, int nRows) {
		int len = s.length();
		if (len < nRows || nRows == 1)
			return s;
		char[][] ret = new char[nRows][s.length()];

		boolean downflag = true;
		int r = 0; // row
		int c = 0; // column
		int i = 0; // index

		while (i < s.length()) {
			char curChar = s.charAt(i);
			if (downflag == false) {
				if (r == 0) {
					ret[r][c] = curChar;
					downflag = true;
					r++;
				} else {
					ret[r][c] = curChar;
					c++;
					r--;
				}
			} else {
				if (r == nRows - 1) {
					ret[r][c] = curChar;
					downflag = false;
					c++;
					r--;
				} else {
					ret[r][c] = curChar;
					r++;
				}
			}
			i++;
		}

		StringBuilder sb = new StringBuilder();
		for (int j = 0; j < nRows; j++) {
			sb.append(getString(ret[j]));
		}
		return sb.toString();
	}