摘要:
Reverse Bits 思路: 错误点:& 没有 / i)!=((n&(1 j): n=n^(1 阅读全文
摘要:
Number of 1 Bits 思路: 速度: For example, the 32 bit integer ’11' has binary representation 00000000000000000000000000001011, so the function should retur 阅读全文
摘要:
Binary Tree Right Side View 错误点: 是if right... if left,而不是if right elif left,因为有可能右子树向下没有左子树深,所以要左子树也遍历。而控制是否是第一个用的是结果list是否已经有元素。这里容易出错是因为会错认为如果有right 阅读全文