摘要:
assign out = {in[7:0], in[15:8]}; // This is different. The 16-bit vector on the right is extended to // match the 24-bit vector on the left, so out[2 阅读全文
摘要:
思路:一个元素出现一次,其余元素出现两次 若a ≠ b,(a ^ a) = 0, (a ^ b) != 0 ,而且a ^ b = b ^ a, 0 ^ a = a 因此数组所有元素异或的结果就是那个只出现一次的元素 Java代码如下: 1 class Solution { 2 public int 阅读全文
摘要:
class Solution { public List<List<Integer>> generate(int numRows) { List<List<Integer>> res = new ArrayList<>(numRows); for(int i = 0;i < numRows;i++) 阅读全文