摘要:
二进制转换和字符串逆序。要考虑int的范围,测试数据是有溢出的。Math.pow是有精度损失的,最好写成整数的。public class ReverseBits { public static int reverseBits(int n) { StringBuilder... 阅读全文
摘要:
Z字形排列,找规律。public class Solution { public String convert(String s, int nRows) { StringBuilder[] sbArr = new StringBuilder[nRows]; for(... 阅读全文