[LintCode/CC] Update Bits [Merge Bits]
2016-03-28
阅读 2 分钟
1.7kGiven two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e g , M becomes a substring of N located at i and starting at j)