public String convert(String s, int nRows) {
		int len = s.length();
		if (len < nRows || nRows == 1)
			return s;
		char[] ret = new char[len];
		int step = 2 * (nRows - 1);
		int count = 0;
		for (int i = 0; i < nRows; i++) {
			int interval = step - i * 2;
			for (int j = i; j < len; j += step) {
				ret[count] = s.charAt(j);
				count++;
				if (interval < step && interval > 0 && j + interval < len
						&& count < len) {
					ret[count] = s.charAt(j + interval);
					count++;
				}
			}
		}
		return new String(ret);
	}