摘要:
179. 更新二进制位 给出两个32位的整数N和M,以及两个二进制位的位置i和j。写一个方法来使得N中的第i到j位等于M(M会是N中从第i为开始到第j位的子串) 注意事项 In the function, the numbers N and M will given in decimal, you 阅读全文
摘要:
181. 将整数A转换为B 如果要将整数A转换为B,需要改变多少个bit位? 注意事项 Both n and m are 32-bit integers. 您在真实的面试中是否遇到过这个题? Yes 样例 如把31转换为14,需要改变2个bit位。 (31)10=(11111)2 (14)10=(0 阅读全文