标签:blog java io for ar div amp log
public boolean isUniqueChars2(String str) { int checker = 0; for (int i = 0; i < str.length(); i++) { int val = str.charAt(i) - ‘a‘; //保证val的值不超过26 if ((checker & (1 << val)) > 0) { return false; } else { checker |= (1 << val);//checker=checker | (1<<val) } } return true; }
CC150 1.1 字符串查唯一bit manipulation详解,布布扣,bubuko.com
CC150 1.1 字符串查唯一bit manipulation详解
标签:blog java io for ar div amp log
原文地址:http://www.cnblogs.com/tonychiang/p/3912766.html