摘要:
二进制转换和字符串逆序。要考虑int的范围,测试数据是有溢出的。Math.pow是有精度损失的,最好写成整数的。public class ReverseBits { public static int reverseBits(int n) { StringBuilder... 阅读全文
posted @ 2015-03-31 23:45
Pickle
阅读(188)
评论(0)
推荐(0)
摘要:
Z字形排列,找规律。public class Solution { public String convert(String s, int nRows) { StringBuilder[] sbArr = new StringBuilder[nRows]; for(... 阅读全文
posted @ 2015-03-31 12:21
Pickle
阅读(195)
评论(0)
推荐(0)
浙公网安备 33010602011771号