public String convert(String s, int numRows) {
		if (numRows == 1)
			return s;
		String[] rows = new String[numRows];
		Arrays.fill(rows, "");
		int row = 0;
		boolean north = false;
		for (int i = 0; i < s.length(); ++i) {
			rows[row] += s.charAt(i);
			if (north == true) {
				--row;
				if (row < 0) {
					row = 1;
					north = false;
				}
			} else {
				++row;
				if (row >= numRows) {
					north = true;
					row = numRows - 2;
				}
			}
		}
		String result = "";
		for (String temp : rows) {
			result += temp;
		}
		return result;
	}